react-native-webrtc-kaleidoscope 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +8 -8
- package/README.md +185 -56
- package/android/build.gradle +13 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/CompositeLayers.kt +127 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/EffectTuning.kt +69 -69
- package/android/src/main/java/com/simiancraft/kaleidoscope/KaleidoscopeModule.kt +86 -33
- package/android/src/main/java/com/simiancraft/kaleidoscope/Registration.kt +23 -64
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/CompositeFactory.kt +691 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/LayerShaders.kt +30 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/TransformFactory.kt +248 -200
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Egl.kt +82 -70
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Fbo.kt +50 -47
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/FramePipeline.kt +106 -105
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/GlDebug.kt +23 -23
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/GlProgram.kt +76 -57
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Ingest.kt +92 -71
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Orientation.kt +25 -25
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Shaders.kt +57 -76
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/ShadersGenerated.kt +1162 -25
- package/android/src/main/java/com/simiancraft/kaleidoscope/segmentation/Mask.kt +254 -242
- package/android/src/main/java/com/simiancraft/kaleidoscope/segmentation/MaskTuning.kt +28 -25
- package/android/src/main/java/com/simiancraft/kaleidoscope/segmentation/SegmentationEngine.kt +104 -98
- package/android/src/test/java/com/simiancraft/kaleidoscope/CompositeLayersTest.kt +165 -0
- package/app.plugin.js +9 -255
- package/catalog/composites/clouds/clouds.controls.tsx +19 -0
- package/catalog/composites/clouds/clouds.ts +32 -0
- package/catalog/composites/corporate-blobs/corporate-blobs.controls.tsx +24 -0
- package/catalog/composites/corporate-blobs/corporate-blobs.thumb.webp +0 -0
- package/catalog/composites/corporate-blobs/corporate-blobs.ts +51 -0
- package/catalog/composites/corporate-blobs/corporate-blobs.web.ts +42 -0
- package/catalog/composites/fairy-cave/fairy-cave.controls.tsx +33 -0
- package/catalog/composites/fairy-cave/fairy-cave.thumb.webp +0 -0
- package/catalog/composites/fairy-cave/fairy-cave.ts +53 -0
- package/catalog/composites/fairy-cave/fairy-cave.web.ts +47 -0
- package/catalog/composites/fairy-grotto/fairy-grotto.controls.tsx +34 -0
- package/catalog/composites/fairy-grotto/fairy-grotto.thumb.webp +0 -0
- package/catalog/composites/fairy-grotto/fairy-grotto.ts +54 -0
- package/catalog/composites/fairy-grotto/fairy-grotto.web.ts +47 -0
- package/catalog/composites/fairy-hollow/fairy-hollow.controls.tsx +34 -0
- package/catalog/composites/fairy-hollow/fairy-hollow.thumb.webp +0 -0
- package/catalog/composites/fairy-hollow/fairy-hollow.ts +55 -0
- package/catalog/composites/fairy-hollow/fairy-hollow.web.ts +47 -0
- package/catalog/composites/nebula/nebula.controls.tsx +19 -0
- package/catalog/composites/nebula/nebula.thumb.webp +0 -0
- package/catalog/composites/nebula/nebula.ts +37 -0
- package/catalog/composites/nebula/nebula.web.ts +30 -0
- package/catalog/composites/observation-deck/observation-deck.controls.tsx +28 -0
- package/catalog/composites/observation-deck/observation-deck.thumb.webp +0 -0
- package/catalog/composites/observation-deck/observation-deck.ts +59 -0
- package/catalog/composites/observation-deck/observation-deck.web.ts +50 -0
- package/catalog/composites/simianlights/simianlights.controls.tsx +19 -0
- package/catalog/composites/simianlights/simianlights.thumb.webp +0 -0
- package/catalog/composites/simianlights/simianlights.ts +34 -0
- package/catalog/composites/simianlights/simianlights.web.ts +29 -0
- package/catalog/composites/underwater/underwater.controls.tsx +19 -0
- package/catalog/composites/underwater/underwater.thumb.webp +0 -0
- package/catalog/composites/underwater/underwater.ts +42 -0
- package/catalog/composites/underwater/underwater.web.ts +36 -0
- package/catalog/composites/wizard-tower/wizard-tower.controls.tsx +23 -0
- package/catalog/composites/wizard-tower/wizard-tower.thumb.webp +0 -0
- package/catalog/composites/wizard-tower/wizard-tower.ts +44 -0
- package/catalog/composites/wizard-tower/wizard-tower.web.ts +35 -0
- package/catalog/composites/wizard-tower-night/wizard-tower-night.controls.tsx +22 -0
- package/catalog/composites/wizard-tower-night/wizard-tower-night.thumb.webp +0 -0
- package/catalog/composites/wizard-tower-night/wizard-tower-night.ts +43 -0
- package/catalog/composites/wizard-tower-night/wizard-tower-night.web.ts +35 -0
- package/catalog/images/README.md +188 -0
- package/catalog/images/corporate/corporate-logo.thumb.webp +0 -0
- package/catalog/images/corporate/corporate-logo.ts +6 -0
- package/catalog/images/corporate/corporate-logo.web.ts +7 -0
- package/catalog/images/corporate/corporate-logo.webp +0 -0
- package/catalog/images/debug/debug-resolutions.thumb.webp +0 -0
- package/catalog/images/debug/debug-resolutions.ts +6 -0
- package/catalog/images/debug/debug-resolutions.web.ts +7 -0
- package/catalog/images/fairy-caves/grotto.thumb.webp +0 -0
- package/catalog/images/fairy-caves/grotto.ts +6 -0
- package/catalog/images/fairy-caves/grotto.web.ts +7 -0
- package/catalog/images/fairy-caves/grotto.webp +0 -0
- package/catalog/images/fairy-caves/hollow.thumb.webp +0 -0
- package/catalog/images/fairy-caves/hollow.ts +6 -0
- package/catalog/images/fairy-caves/hollow.web.ts +7 -0
- package/catalog/images/fairy-caves/hollow.webp +0 -0
- package/catalog/images/fairy-caves/treehouse-2.thumb.webp +0 -0
- package/catalog/images/fairy-caves/treehouse-2.ts +6 -0
- package/catalog/images/fairy-caves/treehouse-2.web.ts +7 -0
- package/catalog/images/fairy-caves/treehouse-2.webp +0 -0
- package/catalog/images/fairy-caves/treehouse-3.thumb.webp +0 -0
- package/catalog/images/fairy-caves/treehouse-3.ts +6 -0
- package/catalog/images/fairy-caves/treehouse-3.web.ts +7 -0
- package/catalog/images/fairy-caves/treehouse-3.webp +0 -0
- package/catalog/images/fairy-caves/treehouse.thumb.webp +0 -0
- package/catalog/images/fairy-caves/treehouse.ts +6 -0
- package/catalog/images/fairy-caves/treehouse.web.ts +7 -0
- package/catalog/images/fairy-caves/treehouse.webp +0 -0
- package/catalog/images/home/home-dark.thumb.webp +0 -0
- package/catalog/images/home/home-dark.ts +6 -0
- package/catalog/images/home/home-dark.web.ts +7 -0
- package/catalog/images/home/home-light.thumb.webp +0 -0
- package/catalog/images/home/home-light.ts +6 -0
- package/catalog/images/home/home-light.web.ts +7 -0
- package/catalog/images/image-ids.ts +42 -0
- package/catalog/images/image.types.ts +5 -0
- package/catalog/images/index.ts +7 -0
- package/catalog/images/nature/landscape-dark.thumb.webp +0 -0
- package/catalog/images/nature/landscape-dark.ts +6 -0
- package/catalog/images/nature/landscape-dark.web.ts +7 -0
- package/catalog/images/nature/landscape-light.thumb.webp +0 -0
- package/catalog/images/nature/landscape-light.ts +6 -0
- package/catalog/images/nature/landscape-light.web.ts +7 -0
- package/catalog/images/office/office-dark.thumb.webp +0 -0
- package/catalog/images/office/office-dark.ts +6 -0
- package/catalog/images/office/office-dark.web.ts +7 -0
- package/catalog/images/office/office-light.thumb.webp +0 -0
- package/catalog/images/office/office-light.ts +6 -0
- package/catalog/images/office/office-light.web.ts +7 -0
- package/catalog/images/sci-fi/sci-fi-light.thumb.webp +0 -0
- package/catalog/images/sci-fi/sci-fi-light.ts +6 -0
- package/catalog/images/sci-fi/sci-fi-light.web.ts +7 -0
- package/catalog/images/simiancraft/simiancraft-dark-transparency.thumb.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-dark-transparency.ts +6 -0
- package/catalog/images/simiancraft/simiancraft-dark-transparency.web.ts +9 -0
- package/catalog/images/simiancraft/simiancraft-dark-transparency.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-dark.thumb.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-dark.ts +6 -0
- package/catalog/images/simiancraft/simiancraft-dark.web.ts +7 -0
- package/catalog/images/simiancraft/simiancraft-light-transparency.thumb.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-light-transparency.ts +6 -0
- package/catalog/images/simiancraft/simiancraft-light-transparency.web.ts +9 -0
- package/catalog/images/simiancraft/simiancraft-light-transparency.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-light.thumb.webp +0 -0
- package/catalog/images/simiancraft/simiancraft-light.ts +6 -0
- package/catalog/images/simiancraft/simiancraft-light.web.ts +7 -0
- package/catalog/images/spaceship/observation-deck.thumb.webp +0 -0
- package/catalog/images/spaceship/observation-deck.ts +6 -0
- package/catalog/images/spaceship/observation-deck.web.ts +7 -0
- package/catalog/images/spaceship/observation-deck.webp +0 -0
- package/catalog/images/underwater/oceanscape-dark.thumb.webp +0 -0
- package/catalog/images/underwater/oceanscape-dark.ts +6 -0
- package/catalog/images/underwater/oceanscape-dark.web.ts +7 -0
- package/catalog/images/underwater/oceanscape-dark.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-1.thumb.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-1.ts +6 -0
- package/catalog/images/wizard-tower/wizard-tower-1.web.ts +7 -0
- package/catalog/images/wizard-tower/wizard-tower-1.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-2.thumb.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-2.ts +6 -0
- package/catalog/images/wizard-tower/wizard-tower-2.web.ts +7 -0
- package/catalog/images/wizard-tower/wizard-tower-2.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-night.thumb.webp +0 -0
- package/catalog/images/wizard-tower/wizard-tower-night.ts +6 -0
- package/catalog/images/wizard-tower/wizard-tower-night.web.ts +7 -0
- package/catalog/images/wizard-tower/wizard-tower-night.webp +0 -0
- package/catalog/shaders/README.md +114 -0
- package/catalog/shaders/_shared/composite-blit.frag +26 -0
- package/catalog/shaders/_shared/composite-camera.frag +17 -0
- package/catalog/shaders/_shared/composite-image.frag +23 -0
- package/catalog/shaders/_shared/composite-masked.frag +26 -0
- package/catalog/shaders/_shared/composite-subject.frag +27 -0
- package/catalog/shaders/_shared/passthrough.vert +27 -0
- package/catalog/shaders/_shared/transform.frag +27 -0
- package/catalog/shaders/_shared/types.ts +63 -0
- package/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.tsx +37 -0
- package/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.frag +123 -0
- package/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.ts +106 -0
- package/catalog/shaders/blur/blur.form.tsx +29 -0
- package/catalog/shaders/blur/blur.ts +32 -0
- package/catalog/shaders/blur/composite-blur.frag +42 -0
- package/catalog/shaders/clouds/clouds.form.tsx +39 -0
- package/catalog/shaders/clouds/clouds.frag +128 -0
- package/catalog/shaders/clouds/clouds.presets.md +37 -0
- package/catalog/shaders/clouds/clouds.ts +124 -0
- package/catalog/shaders/corporate-blobs/corporate-blobs.form.tsx +44 -0
- package/catalog/shaders/corporate-blobs/corporate-blobs.frag +224 -0
- package/catalog/shaders/corporate-blobs/corporate-blobs.ts +136 -0
- package/catalog/shaders/fireflies/fireflies.form.tsx +33 -0
- package/catalog/shaders/fireflies/fireflies.frag +68 -0
- package/catalog/shaders/fireflies/fireflies.ts +61 -0
- package/catalog/shaders/godrays/godrays.form.tsx +37 -0
- package/catalog/shaders/godrays/godrays.frag +85 -0
- package/catalog/shaders/godrays/godrays.ts +105 -0
- package/catalog/shaders/index.ts +78 -0
- package/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.tsx +55 -0
- package/catalog/shaders/light-beams-and-motes/light-beams-and-motes.frag +262 -0
- package/catalog/shaders/light-beams-and-motes/light-beams-and-motes.ts +137 -0
- package/catalog/shaders/nebula/nebula.form.tsx +34 -0
- package/catalog/shaders/nebula/nebula.frag +151 -0
- package/catalog/shaders/nebula/nebula.ts +74 -0
- package/catalog/shaders/plasma/plasma.form.tsx +32 -0
- package/catalog/shaders/plasma/plasma.frag +55 -0
- package/catalog/shaders/plasma/plasma.ts +44 -0
- package/catalog/shaders/simianlights/simianlights.form.tsx +34 -0
- package/catalog/shaders/simianlights/simianlights.frag +151 -0
- package/catalog/shaders/simianlights/simianlights.ts +73 -0
- package/dist/catalog/composites/clouds/clouds.controls.d.ts +3 -0
- package/dist/catalog/composites/clouds/clouds.controls.d.ts.map +1 -0
- package/dist/catalog/composites/clouds/clouds.controls.js +11 -0
- package/dist/catalog/composites/clouds/clouds.controls.js.map +1 -0
- package/dist/catalog/composites/clouds/clouds.d.ts +26 -0
- package/dist/catalog/composites/clouds/clouds.d.ts.map +1 -0
- package/dist/catalog/composites/clouds/clouds.js +33 -0
- package/dist/catalog/composites/clouds/clouds.js.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.d.ts +3 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.d.ts.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.js +13 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.js.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.d.ts +37 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.d.ts.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.js +52 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.js.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.thumb.webp +0 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.web.d.ts +37 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.web.d.ts.map +1 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.web.js +46 -0
- package/dist/catalog/composites/corporate-blobs/corporate-blobs.web.js.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.controls.d.ts +3 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.controls.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.controls.js +13 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.controls.js.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.d.ts +42 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.js +54 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.js.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.thumb.webp +0 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.web.d.ts +42 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.web.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.web.js +51 -0
- package/dist/catalog/composites/fairy-cave/fairy-cave.web.js.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.d.ts +3 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.js +14 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.js.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.d.ts +42 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.js +55 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.js.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.thumb.webp +0 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.web.d.ts +42 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.web.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.web.js +51 -0
- package/dist/catalog/composites/fairy-grotto/fairy-grotto.web.js.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.d.ts +3 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.js +14 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.js.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.d.ts +42 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.js +56 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.js.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.thumb.webp +0 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.web.d.ts +42 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.web.d.ts.map +1 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.web.js +51 -0
- package/dist/catalog/composites/fairy-hollow/fairy-hollow.web.js.map +1 -0
- package/dist/catalog/composites/nebula/nebula.controls.d.ts +3 -0
- package/dist/catalog/composites/nebula/nebula.controls.d.ts.map +1 -0
- package/dist/catalog/composites/nebula/nebula.controls.js +11 -0
- package/dist/catalog/composites/nebula/nebula.controls.js.map +1 -0
- package/dist/catalog/composites/nebula/nebula.d.ts +22 -0
- package/dist/catalog/composites/nebula/nebula.d.ts.map +1 -0
- package/dist/catalog/composites/nebula/nebula.js +38 -0
- package/dist/catalog/composites/nebula/nebula.js.map +1 -0
- package/dist/catalog/composites/nebula/nebula.thumb.webp +0 -0
- package/dist/catalog/composites/nebula/nebula.web.d.ts +22 -0
- package/dist/catalog/composites/nebula/nebula.web.d.ts.map +1 -0
- package/dist/catalog/composites/nebula/nebula.web.js +34 -0
- package/dist/catalog/composites/nebula/nebula.web.js.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.controls.d.ts +3 -0
- package/dist/catalog/composites/observation-deck/observation-deck.controls.d.ts.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.controls.js +13 -0
- package/dist/catalog/composites/observation-deck/observation-deck.controls.js.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.d.ts +41 -0
- package/dist/catalog/composites/observation-deck/observation-deck.d.ts.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.js +60 -0
- package/dist/catalog/composites/observation-deck/observation-deck.js.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.thumb.webp +0 -0
- package/dist/catalog/composites/observation-deck/observation-deck.web.d.ts +41 -0
- package/dist/catalog/composites/observation-deck/observation-deck.web.d.ts.map +1 -0
- package/dist/catalog/composites/observation-deck/observation-deck.web.js +54 -0
- package/dist/catalog/composites/observation-deck/observation-deck.web.js.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.controls.d.ts +3 -0
- package/dist/catalog/composites/simianlights/simianlights.controls.d.ts.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.controls.js +11 -0
- package/dist/catalog/composites/simianlights/simianlights.controls.js.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.d.ts +22 -0
- package/dist/catalog/composites/simianlights/simianlights.d.ts.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.js +30 -0
- package/dist/catalog/composites/simianlights/simianlights.js.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.thumb.webp +0 -0
- package/dist/catalog/composites/simianlights/simianlights.web.d.ts +22 -0
- package/dist/catalog/composites/simianlights/simianlights.web.d.ts.map +1 -0
- package/dist/catalog/composites/simianlights/simianlights.web.js +33 -0
- package/dist/catalog/composites/simianlights/simianlights.web.js.map +1 -0
- package/dist/catalog/composites/underwater/underwater.controls.d.ts +3 -0
- package/dist/catalog/composites/underwater/underwater.controls.d.ts.map +1 -0
- package/dist/catalog/composites/underwater/underwater.controls.js +11 -0
- package/dist/catalog/composites/underwater/underwater.controls.js.map +1 -0
- package/dist/catalog/composites/underwater/underwater.d.ts +30 -0
- package/dist/catalog/composites/underwater/underwater.d.ts.map +1 -0
- package/dist/catalog/composites/underwater/underwater.js +43 -0
- package/dist/catalog/composites/underwater/underwater.js.map +1 -0
- package/dist/catalog/composites/underwater/underwater.thumb.webp +0 -0
- package/dist/catalog/composites/underwater/underwater.web.d.ts +30 -0
- package/dist/catalog/composites/underwater/underwater.web.d.ts.map +1 -0
- package/dist/catalog/composites/underwater/underwater.web.js +40 -0
- package/dist/catalog/composites/underwater/underwater.web.js.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.controls.d.ts +3 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.controls.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.controls.js +15 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.controls.js.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.d.ts +31 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.js +45 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.js.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.thumb.webp +0 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.web.d.ts +31 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.web.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.web.js +39 -0
- package/dist/catalog/composites/wizard-tower/wizard-tower.web.js.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.d.ts +3 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.js +14 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.js.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.d.ts +31 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.js +44 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.js.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.thumb.webp +0 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.web.d.ts +31 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.web.d.ts.map +1 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.web.js +39 -0
- package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.web.js.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.d.ts +3 -0
- package/dist/catalog/images/corporate/corporate-logo.d.ts.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.js +8 -0
- package/dist/catalog/images/corporate/corporate-logo.js.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.thumb.webp +0 -0
- package/dist/catalog/images/corporate/corporate-logo.web.d.ts +3 -0
- package/dist/catalog/images/corporate/corporate-logo.web.d.ts.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.web.js +12 -0
- package/dist/catalog/images/corporate/corporate-logo.web.js.map +1 -0
- package/dist/catalog/images/corporate/corporate-logo.webp +0 -0
- package/dist/catalog/images/debug/debug-resolutions.d.ts +3 -0
- package/dist/catalog/images/debug/debug-resolutions.d.ts.map +1 -0
- package/dist/catalog/images/debug/debug-resolutions.js +8 -0
- package/dist/catalog/images/debug/debug-resolutions.js.map +1 -0
- package/dist/catalog/images/debug/debug-resolutions.thumb.webp +0 -0
- package/dist/catalog/images/debug/debug-resolutions.web.d.ts +3 -0
- package/dist/catalog/images/debug/debug-resolutions.web.d.ts.map +1 -0
- package/dist/catalog/images/debug/debug-resolutions.web.js +12 -0
- package/dist/catalog/images/debug/debug-resolutions.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/grotto.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.js +8 -0
- package/dist/catalog/images/fairy-caves/grotto.js.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/grotto.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/grotto.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.web.js +12 -0
- package/dist/catalog/images/fairy-caves/grotto.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/grotto.webp +0 -0
- package/dist/catalog/images/fairy-caves/hollow.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/hollow.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/hollow.js +8 -0
- package/dist/catalog/images/fairy-caves/hollow.js.map +1 -0
- package/dist/catalog/images/fairy-caves/hollow.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/hollow.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/hollow.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/hollow.web.js +12 -0
- package/dist/catalog/images/fairy-caves/hollow.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/hollow.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.js +8 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.web.js +12 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-2.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.js +8 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.web.js +12 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse-3.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse.js +8 -0
- package/dist/catalog/images/fairy-caves/treehouse.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse.thumb.webp +0 -0
- package/dist/catalog/images/fairy-caves/treehouse.web.d.ts +3 -0
- package/dist/catalog/images/fairy-caves/treehouse.web.d.ts.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse.web.js +12 -0
- package/dist/catalog/images/fairy-caves/treehouse.web.js.map +1 -0
- package/dist/catalog/images/fairy-caves/treehouse.webp +0 -0
- package/dist/catalog/images/home/home-dark.d.ts +3 -0
- package/dist/catalog/images/home/home-dark.d.ts.map +1 -0
- package/dist/catalog/images/home/home-dark.js +8 -0
- package/dist/catalog/images/home/home-dark.js.map +1 -0
- package/dist/catalog/images/home/home-dark.thumb.webp +0 -0
- package/dist/catalog/images/home/home-dark.web.d.ts +3 -0
- package/dist/catalog/images/home/home-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/home/home-dark.web.js +12 -0
- package/dist/catalog/images/home/home-dark.web.js.map +1 -0
- package/dist/catalog/images/home/home-light.d.ts +3 -0
- package/dist/catalog/images/home/home-light.d.ts.map +1 -0
- package/dist/catalog/images/home/home-light.js +8 -0
- package/dist/catalog/images/home/home-light.js.map +1 -0
- package/dist/catalog/images/home/home-light.thumb.webp +0 -0
- package/dist/catalog/images/home/home-light.web.d.ts +3 -0
- package/dist/catalog/images/home/home-light.web.d.ts.map +1 -0
- package/dist/catalog/images/home/home-light.web.js +12 -0
- package/dist/catalog/images/home/home-light.web.js.map +1 -0
- package/dist/catalog/images/image-ids.d.ts +3 -0
- package/dist/catalog/images/image-ids.d.ts.map +1 -0
- package/dist/catalog/images/image-ids.js +43 -0
- package/dist/catalog/images/image-ids.js.map +1 -0
- package/dist/catalog/images/image.types.d.ts +2 -0
- package/dist/catalog/images/image.types.d.ts.map +1 -0
- package/dist/catalog/images/image.types.js +3 -0
- package/dist/catalog/images/image.types.js.map +1 -0
- package/dist/catalog/images/index.d.ts +3 -0
- package/dist/catalog/images/index.d.ts.map +1 -0
- package/dist/catalog/images/index.js +10 -0
- package/dist/catalog/images/index.js.map +1 -0
- package/dist/catalog/images/nature/landscape-dark.d.ts +3 -0
- package/dist/catalog/images/nature/landscape-dark.d.ts.map +1 -0
- package/dist/catalog/images/nature/landscape-dark.js +8 -0
- package/dist/catalog/images/nature/landscape-dark.js.map +1 -0
- package/dist/catalog/images/nature/landscape-dark.thumb.webp +0 -0
- package/dist/catalog/images/nature/landscape-dark.web.d.ts +3 -0
- package/dist/catalog/images/nature/landscape-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/nature/landscape-dark.web.js +12 -0
- package/dist/catalog/images/nature/landscape-dark.web.js.map +1 -0
- package/dist/catalog/images/nature/landscape-light.d.ts +3 -0
- package/dist/catalog/images/nature/landscape-light.d.ts.map +1 -0
- package/dist/catalog/images/nature/landscape-light.js +8 -0
- package/dist/catalog/images/nature/landscape-light.js.map +1 -0
- package/dist/catalog/images/nature/landscape-light.thumb.webp +0 -0
- package/dist/catalog/images/nature/landscape-light.web.d.ts +3 -0
- package/dist/catalog/images/nature/landscape-light.web.d.ts.map +1 -0
- package/dist/catalog/images/nature/landscape-light.web.js +12 -0
- package/dist/catalog/images/nature/landscape-light.web.js.map +1 -0
- package/dist/catalog/images/office/office-dark.d.ts +3 -0
- package/dist/catalog/images/office/office-dark.d.ts.map +1 -0
- package/dist/catalog/images/office/office-dark.js +8 -0
- package/dist/catalog/images/office/office-dark.js.map +1 -0
- package/dist/catalog/images/office/office-dark.thumb.webp +0 -0
- package/dist/catalog/images/office/office-dark.web.d.ts +3 -0
- package/dist/catalog/images/office/office-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/office/office-dark.web.js +12 -0
- package/dist/catalog/images/office/office-dark.web.js.map +1 -0
- package/dist/catalog/images/office/office-light.d.ts +3 -0
- package/dist/catalog/images/office/office-light.d.ts.map +1 -0
- package/dist/catalog/images/office/office-light.js +8 -0
- package/dist/catalog/images/office/office-light.js.map +1 -0
- package/dist/catalog/images/office/office-light.thumb.webp +0 -0
- package/dist/catalog/images/office/office-light.web.d.ts +3 -0
- package/dist/catalog/images/office/office-light.web.d.ts.map +1 -0
- package/dist/catalog/images/office/office-light.web.js +12 -0
- package/dist/catalog/images/office/office-light.web.js.map +1 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.d.ts +3 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.d.ts.map +1 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.js +8 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.js.map +1 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.thumb.webp +0 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.web.d.ts +3 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.web.d.ts.map +1 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.web.js +12 -0
- package/dist/catalog/images/sci-fi/sci-fi-light.web.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.js +8 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.thumb.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.web.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.web.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.web.js +12 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.web.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark-transparency.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.js +8 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.thumb.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.web.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.web.js +12 -0
- package/dist/catalog/images/simiancraft/simiancraft-dark.web.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.js +8 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.thumb.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.web.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.web.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.web.js +12 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.web.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light-transparency.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.js +8 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.js.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.thumb.webp +0 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.web.d.ts +3 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.web.d.ts.map +1 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.web.js +12 -0
- package/dist/catalog/images/simiancraft/simiancraft-light.web.js.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.d.ts +3 -0
- package/dist/catalog/images/spaceship/observation-deck.d.ts.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.js +8 -0
- package/dist/catalog/images/spaceship/observation-deck.js.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.thumb.webp +0 -0
- package/dist/catalog/images/spaceship/observation-deck.web.d.ts +3 -0
- package/dist/catalog/images/spaceship/observation-deck.web.d.ts.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.web.js +12 -0
- package/dist/catalog/images/spaceship/observation-deck.web.js.map +1 -0
- package/dist/catalog/images/spaceship/observation-deck.webp +0 -0
- package/dist/catalog/images/underwater/oceanscape-dark.d.ts +3 -0
- package/dist/catalog/images/underwater/oceanscape-dark.d.ts.map +1 -0
- package/dist/catalog/images/underwater/oceanscape-dark.js +8 -0
- package/dist/catalog/images/underwater/oceanscape-dark.js.map +1 -0
- package/dist/catalog/images/underwater/oceanscape-dark.thumb.webp +0 -0
- package/dist/catalog/images/underwater/oceanscape-dark.web.d.ts +3 -0
- package/dist/catalog/images/underwater/oceanscape-dark.web.d.ts.map +1 -0
- package/dist/catalog/images/underwater/oceanscape-dark.web.js +12 -0
- package/dist/catalog/images/underwater/oceanscape-dark.web.js.map +1 -0
- package/dist/catalog/images/underwater/oceanscape-dark.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.js +8 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.thumb.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.web.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.web.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.web.js +12 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.web.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-1.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.js +8 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.thumb.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.web.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.web.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.web.js +12 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.web.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-2.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.js +8 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.thumb.webp +0 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.web.d.ts +3 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.web.d.ts.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.web.js +12 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.web.js.map +1 -0
- package/dist/catalog/images/wizard-tower/wizard-tower-night.webp +0 -0
- package/dist/catalog/shaders/_shared/types.d.ts +38 -0
- package/dist/catalog/shaders/_shared/types.d.ts.map +1 -0
- package/dist/catalog/shaders/_shared/types.js +15 -0
- package/dist/catalog/shaders/_shared/types.js.map +1 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.d.ts +26 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.d.ts.map +1 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.d.ts +3 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.d.ts.map +1 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.js +15 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.js.map +1 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.js +84 -0
- package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.js.map +1 -0
- package/dist/catalog/shaders/blur/blur.d.ts +15 -0
- package/dist/catalog/shaders/blur/blur.d.ts.map +1 -0
- package/dist/catalog/shaders/blur/blur.form.d.ts +3 -0
- package/dist/catalog/shaders/blur/blur.form.d.ts.map +1 -0
- package/dist/catalog/shaders/blur/blur.form.js +15 -0
- package/dist/catalog/shaders/blur/blur.form.js.map +1 -0
- package/dist/catalog/shaders/blur/blur.js +27 -0
- package/dist/catalog/shaders/blur/blur.js.map +1 -0
- package/dist/catalog/shaders/clouds/clouds.d.ts +34 -0
- package/dist/catalog/shaders/clouds/clouds.d.ts.map +1 -0
- package/dist/catalog/shaders/clouds/clouds.form.d.ts +3 -0
- package/dist/catalog/shaders/clouds/clouds.form.d.ts.map +1 -0
- package/dist/catalog/shaders/clouds/clouds.form.js +15 -0
- package/dist/catalog/shaders/clouds/clouds.form.js.map +1 -0
- package/dist/catalog/shaders/clouds/clouds.js +98 -0
- package/dist/catalog/shaders/clouds/clouds.js.map +1 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.d.ts +40 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.d.ts.map +1 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.d.ts +3 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.d.ts.map +1 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.js +15 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.js.map +1 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.js +100 -0
- package/dist/catalog/shaders/corporate-blobs/corporate-blobs.js.map +1 -0
- package/dist/catalog/shaders/fireflies/fireflies.d.ts +18 -0
- package/dist/catalog/shaders/fireflies/fireflies.d.ts.map +1 -0
- package/dist/catalog/shaders/fireflies/fireflies.form.d.ts +3 -0
- package/dist/catalog/shaders/fireflies/fireflies.form.d.ts.map +1 -0
- package/dist/catalog/shaders/fireflies/fireflies.form.js +15 -0
- package/dist/catalog/shaders/fireflies/fireflies.form.js.map +1 -0
- package/dist/catalog/shaders/fireflies/fireflies.js +47 -0
- package/dist/catalog/shaders/fireflies/fireflies.js.map +1 -0
- package/dist/catalog/shaders/godrays/godrays.d.ts +26 -0
- package/dist/catalog/shaders/godrays/godrays.d.ts.map +1 -0
- package/dist/catalog/shaders/godrays/godrays.form.d.ts +3 -0
- package/dist/catalog/shaders/godrays/godrays.form.d.ts.map +1 -0
- package/dist/catalog/shaders/godrays/godrays.form.js +15 -0
- package/dist/catalog/shaders/godrays/godrays.form.js.map +1 -0
- package/dist/catalog/shaders/godrays/godrays.js +83 -0
- package/dist/catalog/shaders/godrays/godrays.js.map +1 -0
- package/dist/catalog/shaders/index.d.ts +73 -0
- package/dist/catalog/shaders/index.d.ts.map +1 -0
- package/dist/catalog/shaders/index.js +30 -0
- package/dist/catalog/shaders/index.js.map +1 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.d.ts +44 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.d.ts.map +1 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.d.ts +3 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.d.ts.map +1 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.js +16 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.js.map +1 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.js +91 -0
- package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.js.map +1 -0
- package/dist/catalog/shaders/nebula/nebula.d.ts +20 -0
- package/dist/catalog/shaders/nebula/nebula.d.ts.map +1 -0
- package/dist/catalog/shaders/nebula/nebula.form.d.ts +3 -0
- package/dist/catalog/shaders/nebula/nebula.form.d.ts.map +1 -0
- package/dist/catalog/shaders/nebula/nebula.form.js +15 -0
- package/dist/catalog/shaders/nebula/nebula.form.js.map +1 -0
- package/dist/catalog/shaders/nebula/nebula.js +58 -0
- package/dist/catalog/shaders/nebula/nebula.js.map +1 -0
- package/dist/catalog/shaders/plasma/plasma.d.ts +16 -0
- package/dist/catalog/shaders/plasma/plasma.d.ts.map +1 -0
- package/dist/catalog/shaders/plasma/plasma.form.d.ts +3 -0
- package/dist/catalog/shaders/plasma/plasma.form.d.ts.map +1 -0
- package/dist/catalog/shaders/plasma/plasma.form.js +15 -0
- package/dist/catalog/shaders/plasma/plasma.form.js.map +1 -0
- package/dist/catalog/shaders/plasma/plasma.js +32 -0
- package/dist/catalog/shaders/plasma/plasma.js.map +1 -0
- package/dist/catalog/shaders/simianlights/simianlights.d.ts +20 -0
- package/dist/catalog/shaders/simianlights/simianlights.d.ts.map +1 -0
- package/dist/catalog/shaders/simianlights/simianlights.form.d.ts +3 -0
- package/dist/catalog/shaders/simianlights/simianlights.form.d.ts.map +1 -0
- package/dist/catalog/shaders/simianlights/simianlights.form.js +15 -0
- package/dist/catalog/shaders/simianlights/simianlights.form.js.map +1 -0
- package/dist/catalog/shaders/simianlights/simianlights.js +57 -0
- package/dist/catalog/shaders/simianlights/simianlights.js.map +1 -0
- package/dist/src/components/form/control-form.d.ts +37 -0
- package/dist/src/components/form/control-form.d.ts.map +1 -0
- package/dist/src/components/form/control-form.js +55 -0
- package/dist/src/components/form/control-form.js.map +1 -0
- package/dist/src/components/form/make-controls.d.ts +22 -0
- package/dist/src/components/form/make-controls.d.ts.map +1 -0
- package/dist/src/components/form/make-controls.js +19 -0
- package/dist/src/components/form/make-controls.js.map +1 -0
- package/dist/src/components/form/scope.d.ts +2 -0
- package/dist/src/components/form/scope.d.ts.map +1 -0
- package/dist/src/components/form/scope.js +11 -0
- package/dist/src/components/form/scope.js.map +1 -0
- package/dist/src/components/form/use-field.d.ts +10 -0
- package/dist/src/components/form/use-field.d.ts.map +1 -0
- package/dist/src/components/form/use-field.js +27 -0
- package/dist/src/components/form/use-field.js.map +1 -0
- package/dist/src/components/preset-book-menu/index.d.ts +52 -0
- package/dist/src/components/preset-book-menu/index.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/index.js +152 -0
- package/dist/src/components/preset-book-menu/index.js.map +1 -0
- package/dist/src/components/preset-book-menu/layout.d.ts +25 -0
- package/dist/src/components/preset-book-menu/layout.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/layout.js +19 -0
- package/dist/src/components/preset-book-menu/layout.js.map +1 -0
- package/dist/src/components/preset-book-menu/preset-book-menu.types.d.ts +88 -0
- package/dist/src/components/preset-book-menu/preset-book-menu.types.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/preset-book-menu.types.js +14 -0
- package/dist/src/components/preset-book-menu/preset-book-menu.types.js.map +1 -0
- package/dist/src/components/preset-book-menu/preset-grid.d.ts +16 -0
- package/dist/src/components/preset-book-menu/preset-grid.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/preset-grid.js +49 -0
- package/dist/src/components/preset-book-menu/preset-grid.js.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.d.ts +3 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.js +28 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.js.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.types.d.ts +13 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.types.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.types.js +5 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.types.js.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.web.d.ts +3 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.web.d.ts.map +1 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.web.js +17 -0
- package/dist/src/components/preset-book-menu/resolve-image-uri.web.js.map +1 -0
- package/dist/src/components/preset-control-panel/composite-layer-control-panel.d.ts +14 -0
- package/dist/src/components/preset-control-panel/composite-layer-control-panel.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/composite-layer-control-panel.js +36 -0
- package/dist/src/components/preset-control-panel/composite-layer-control-panel.js.map +1 -0
- package/dist/src/components/preset-control-panel/control-section.d.ts +9 -0
- package/dist/src/components/preset-control-panel/control-section.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/control-section.js +47 -0
- package/dist/src/components/preset-control-panel/control-section.js.map +1 -0
- package/dist/src/components/preset-control-panel/control.d.ts +10 -0
- package/dist/src/components/preset-control-panel/control.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/control.js +35 -0
- package/dist/src/components/preset-control-panel/control.js.map +1 -0
- package/dist/src/components/preset-control-panel/index.d.ts +14 -0
- package/dist/src/components/preset-control-panel/index.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/index.js +49 -0
- package/dist/src/components/preset-control-panel/index.js.map +1 -0
- package/dist/src/components/preset-control-panel/mask-control-panel.d.ts +11 -0
- package/dist/src/components/preset-control-panel/mask-control-panel.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/mask-control-panel.js +34 -0
- package/dist/src/components/preset-control-panel/mask-control-panel.js.map +1 -0
- package/dist/src/components/preset-control-panel/preset-control-panel.d.ts +12 -0
- package/dist/src/components/preset-control-panel/preset-control-panel.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/preset-control-panel.js +23 -0
- package/dist/src/components/preset-control-panel/preset-control-panel.js.map +1 -0
- package/dist/src/components/preset-control-panel/transform-control-panel.d.ts +14 -0
- package/dist/src/components/preset-control-panel/transform-control-panel.d.ts.map +1 -0
- package/dist/src/components/preset-control-panel/transform-control-panel.js +58 -0
- package/dist/src/components/preset-control-panel/transform-control-panel.js.map +1 -0
- package/dist/src/components/preset-tile/index.d.ts +24 -0
- package/dist/src/components/preset-tile/index.d.ts.map +1 -0
- package/dist/src/components/preset-tile/index.js +98 -0
- package/dist/src/components/preset-tile/index.js.map +1 -0
- package/dist/src/components/theme/provider.d.ts +18 -0
- package/dist/src/components/theme/provider.d.ts.map +1 -0
- package/dist/src/components/theme/provider.js +29 -0
- package/dist/src/components/theme/provider.js.map +1 -0
- package/dist/src/components/theme/slots.d.ts +17 -0
- package/dist/src/components/theme/slots.d.ts.map +1 -0
- package/dist/src/components/theme/slots.js +9 -0
- package/dist/src/components/theme/slots.js.map +1 -0
- package/dist/src/components/ui/button.d.ts +14 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +29 -0
- package/dist/src/components/ui/button.js.map +1 -0
- package/dist/src/components/ui/color-picker.d.ts +12 -0
- package/dist/src/components/ui/color-picker.d.ts.map +1 -0
- package/dist/src/components/ui/color-picker.js +43 -0
- package/dist/src/components/ui/color-picker.js.map +1 -0
- package/dist/src/components/ui/index.d.ts +6 -0
- package/dist/src/components/ui/index.d.ts.map +1 -0
- package/dist/src/components/ui/index.js +18 -0
- package/dist/src/components/ui/index.js.map +1 -0
- package/dist/src/components/ui/label.d.ts +10 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +14 -0
- package/dist/src/components/ui/label.js.map +1 -0
- package/dist/src/components/ui/point.d.ts +19 -0
- package/dist/src/components/ui/point.d.ts.map +1 -0
- package/dist/src/components/ui/point.js +52 -0
- package/dist/src/components/ui/point.js.map +1 -0
- package/dist/src/components/ui/polygon-field.d.ts +10 -0
- package/dist/src/components/ui/polygon-field.d.ts.map +1 -0
- package/dist/src/components/ui/polygon-field.js +50 -0
- package/dist/src/components/ui/polygon-field.js.map +1 -0
- package/dist/src/components/ui/readout.d.ts +10 -0
- package/dist/src/components/ui/readout.d.ts.map +1 -0
- package/dist/src/components/ui/readout.js +14 -0
- package/dist/src/components/ui/readout.js.map +1 -0
- package/dist/src/components/ui/slider-value.d.ts +8 -0
- package/dist/src/components/ui/slider-value.d.ts.map +1 -0
- package/dist/src/components/ui/slider-value.js +17 -0
- package/dist/src/components/ui/slider-value.js.map +1 -0
- package/dist/src/components/ui/slider.d.ts +15 -0
- package/dist/src/components/ui/slider.d.ts.map +1 -0
- package/dist/src/components/ui/slider.js +58 -0
- package/dist/src/components/ui/slider.js.map +1 -0
- package/dist/src/components/ui/switch.d.ts +8 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +24 -0
- package/dist/src/components/ui/switch.js.map +1 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +187 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.web.d.ts +32 -0
- package/dist/src/index.web.d.ts.map +1 -0
- package/dist/src/index.web.js +119 -0
- package/dist/src/index.web.js.map +1 -0
- package/dist/src/kaleidoscope/controls.d.ts +24 -0
- package/dist/src/kaleidoscope/controls.d.ts.map +1 -0
- package/dist/src/kaleidoscope/controls.js +92 -0
- package/dist/src/kaleidoscope/controls.js.map +1 -0
- package/dist/src/kaleidoscope/effect.d.ts +4 -0
- package/dist/src/kaleidoscope/effect.d.ts.map +1 -0
- package/dist/src/kaleidoscope/effect.js +7 -0
- package/dist/src/kaleidoscope/effect.js.map +1 -0
- package/dist/src/kaleidoscope/effect.types.d.ts +47 -0
- package/dist/src/kaleidoscope/effect.types.d.ts.map +1 -0
- package/dist/src/kaleidoscope/effect.types.js +9 -0
- package/dist/src/kaleidoscope/effect.types.js.map +1 -0
- package/dist/src/kaleidoscope/shader-to-spec.d.ts +4 -0
- package/dist/src/kaleidoscope/shader-to-spec.d.ts.map +1 -0
- package/dist/src/kaleidoscope/shader-to-spec.js +17 -0
- package/dist/src/kaleidoscope/shader-to-spec.js.map +1 -0
- package/dist/src/kaleidoscope/types.d.ts +79 -0
- package/dist/src/kaleidoscope/types.d.ts.map +1 -0
- package/dist/src/kaleidoscope/types.js +18 -0
- package/dist/src/kaleidoscope/types.js.map +1 -0
- package/dist/src/kaleidoscope.preset-book.types.d.ts +86 -0
- package/dist/src/kaleidoscope.preset-book.types.d.ts.map +1 -0
- package/dist/src/kaleidoscope.preset-book.types.js +16 -0
- package/dist/src/kaleidoscope.preset-book.types.js.map +1 -0
- package/dist/src/lib/primitives.types.d.ts +3 -0
- package/dist/src/lib/primitives.types.d.ts.map +1 -0
- package/dist/src/lib/primitives.types.js +5 -0
- package/dist/src/lib/primitives.types.js.map +1 -0
- package/dist/src/lib/test-id.d.ts +30 -0
- package/dist/src/lib/test-id.d.ts.map +1 -0
- package/dist/src/lib/test-id.js +81 -0
- package/dist/src/lib/test-id.js.map +1 -0
- package/dist/src/livekit.d.ts +24 -0
- package/dist/src/livekit.d.ts.map +1 -0
- package/dist/src/livekit.js +63 -0
- package/dist/src/livekit.js.map +1 -0
- package/dist/src/nativewind.d.ts +7 -0
- package/dist/src/nativewind.d.ts.map +1 -0
- package/dist/src/nativewind.js +43 -0
- package/dist/src/nativewind.js.map +1 -0
- package/dist/web-driver/effects/composite.d.ts +14 -0
- package/dist/web-driver/effects/composite.d.ts.map +1 -0
- package/dist/web-driver/effects/composite.js +576 -0
- package/dist/web-driver/effects/composite.js.map +1 -0
- package/dist/web-driver/effects/layer-shaders.d.ts +2 -0
- package/dist/web-driver/effects/layer-shaders.d.ts.map +1 -0
- package/dist/web-driver/effects/layer-shaders.js +11 -0
- package/dist/web-driver/effects/layer-shaders.js.map +1 -0
- package/dist/web-driver/effects/transform.d.ts +4 -0
- package/dist/web-driver/effects/transform.d.ts.map +1 -0
- package/dist/web-driver/effects/transform.js +66 -0
- package/dist/web-driver/effects/transform.js.map +1 -0
- package/dist/web-driver/index.d.ts +6 -0
- package/dist/web-driver/index.d.ts.map +1 -0
- package/dist/web-driver/index.js +21 -0
- package/dist/web-driver/index.js.map +1 -0
- package/dist/web-driver/insertable-streams.d.ts.map +1 -0
- package/dist/web-driver/insertable-streams.js +68 -0
- package/dist/web-driver/insertable-streams.js.map +1 -0
- package/dist/web-driver/segmenter.d.ts.map +1 -0
- package/dist/web-driver/segmenter.js +89 -0
- package/dist/web-driver/segmenter.js.map +1 -0
- package/dist/web-driver/shaders.d.ts +2 -0
- package/dist/web-driver/shaders.d.ts.map +1 -0
- package/dist/web-driver/shaders.generated.d.ts +17 -0
- package/dist/web-driver/shaders.generated.d.ts.map +1 -0
- package/dist/web-driver/shaders.generated.js +1180 -0
- package/dist/web-driver/shaders.generated.js.map +1 -0
- package/dist/web-driver/shaders.js +28 -0
- package/dist/web-driver/shaders.js.map +1 -0
- package/dist/web-driver/tuning.d.ts.map +1 -0
- package/dist/web-driver/tuning.js +61 -0
- package/dist/web-driver/tuning.js.map +1 -0
- package/ios/Kaleidoscope.podspec +22 -15
- package/ios/KaleidoscopeModule/BundledImage.swift +39 -0
- package/ios/KaleidoscopeModule/CompositeLayers.swift +142 -0
- package/ios/KaleidoscopeModule/EffectTuning.swift +86 -86
- package/ios/KaleidoscopeModule/KaleidoscopeModule.swift +55 -27
- package/ios/KaleidoscopeModule/Registration.swift +36 -57
- package/ios/KaleidoscopeModule/effects/CompositeProcessor.swift +906 -0
- package/ios/KaleidoscopeModule/effects/FrameBridge.swift +25 -25
- package/ios/KaleidoscopeModule/effects/TransformProcessor.swift +127 -126
- package/ios/KaleidoscopeModule/gpu/CompositeRendering.swift +352 -0
- package/ios/KaleidoscopeModule/gpu/Ingest.swift +104 -102
- package/ios/KaleidoscopeModule/gpu/MetalRenderer.swift +473 -544
- package/ios/KaleidoscopeModule/gpu/Orientation.swift +41 -41
- package/ios/KaleidoscopeModule/gpu/ShaderLibrary.swift +100 -54
- package/ios/KaleidoscopeModule/gpu/TextureBridge.swift +245 -244
- package/ios/KaleidoscopeModule/segmentation/MaskTuning.swift +11 -11
- package/ios/KaleidoscopeModule/segmentation/Segmenter.swift +360 -359
- package/ios/KaleidoscopeModule/shaders/GENERATIVE.txt +9 -0
- package/ios/KaleidoscopeModule/shaders/SHADERS.txt +13 -2
- package/ios/KaleidoscopeModule/shaders/anamorphic-lensflare.metalsrc +47 -0
- package/ios/KaleidoscopeModule/shaders/clouds.metalsrc +185 -0
- package/ios/KaleidoscopeModule/shaders/composite-blit.metalsrc +22 -0
- package/ios/KaleidoscopeModule/shaders/composite-blur.metalsrc +93 -0
- package/ios/KaleidoscopeModule/shaders/composite-camera.metalsrc +22 -0
- package/ios/KaleidoscopeModule/shaders/composite-image.metalsrc +24 -0
- package/ios/KaleidoscopeModule/shaders/composite-masked.metalsrc +22 -0
- package/ios/KaleidoscopeModule/shaders/composite-subject.metalsrc +23 -0
- package/ios/KaleidoscopeModule/shaders/corporate-blobs.metalsrc +221 -0
- package/ios/KaleidoscopeModule/shaders/fireflies.metalsrc +44 -0
- package/ios/KaleidoscopeModule/shaders/godrays.metalsrc +46 -0
- package/ios/KaleidoscopeModule/shaders/light-beams-and-motes.metalsrc +316 -0
- package/ios/KaleidoscopeModule/shaders/nebula.metalsrc +45 -45
- package/ios/KaleidoscopeModule/shaders/plasma.metalsrc +26 -0
- package/ios/KaleidoscopeModule/shaders/simianlights.metalsrc +45 -45
- package/package.json +485 -115
- package/plugin/build/android/assets.js +45 -0
- package/plugin/build/android/index.js +34 -0
- package/plugin/build/index.js +39 -0
- package/plugin/build/ios/assets.js +110 -0
- package/plugin/build/ios/deployment-target.js +105 -0
- package/plugin/build/ios/index.js +63 -0
- package/plugin/build/ios/pods.js +73 -0
- package/plugin/build/lib/constants.js +15 -0
- package/plugin/build/lib/file-manipulation.js +57 -0
- package/plugin/build/lib/mods.js +36 -0
- package/plugin/build/lib/preset-book.js +215 -0
- package/plugin/build/lib/types.js +16 -0
- package/src/components/form/control-form.tsx +112 -0
- package/src/components/form/make-controls.ts +33 -0
- package/src/components/form/scope.ts +9 -0
- package/src/components/form/use-field.ts +35 -0
- package/src/components/preset-book-menu/index.tsx +286 -0
- package/src/components/preset-book-menu/layout.tsx +63 -0
- package/src/components/preset-book-menu/preset-book-menu.types.ts +112 -0
- package/src/components/preset-book-menu/preset-grid.tsx +80 -0
- package/src/components/preset-book-menu/resolve-image-uri.ts +31 -0
- package/src/components/preset-book-menu/resolve-image-uri.types.ts +18 -0
- package/src/components/preset-book-menu/resolve-image-uri.web.ts +15 -0
- package/src/components/preset-control-panel/composite-layer-control-panel.tsx +56 -0
- package/src/components/preset-control-panel/control-section.tsx +84 -0
- package/src/components/preset-control-panel/control.tsx +50 -0
- package/src/components/preset-control-panel/index.ts +31 -0
- package/src/components/preset-control-panel/mask-control-panel.tsx +93 -0
- package/src/components/preset-control-panel/preset-control-panel.tsx +48 -0
- package/src/components/preset-control-panel/transform-control-panel.tsx +146 -0
- package/src/components/preset-tile/index.tsx +160 -0
- package/src/components/theme/provider.tsx +50 -0
- package/src/components/theme/slots.ts +37 -0
- package/src/components/ui/button.tsx +54 -0
- package/src/components/ui/color-picker.tsx +74 -0
- package/src/components/ui/index.ts +10 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/point.tsx +116 -0
- package/src/components/ui/polygon-field.tsx +84 -0
- package/src/components/ui/readout.tsx +25 -0
- package/src/components/ui/slider-value.ts +15 -0
- package/src/components/ui/slider.tsx +98 -0
- package/src/components/ui/switch.tsx +40 -0
- package/src/index.ts +176 -95
- package/src/index.web.ts +126 -74
- package/src/kaleidoscope/controls.ts +127 -0
- package/src/kaleidoscope/effect.ts +5 -0
- package/src/kaleidoscope/effect.types.ts +63 -0
- package/src/kaleidoscope/shader-to-spec.ts +16 -0
- package/src/kaleidoscope/types.ts +101 -0
- package/src/kaleidoscope.preset-book.types.ts +105 -0
- package/src/lib/primitives.types.ts +5 -0
- package/src/lib/test-id.ts +81 -0
- package/src/livekit.ts +6 -4
- package/src/nativewind.ts +41 -0
- package/android/src/main/assets/backgrounds/stylized-dark.webp +0 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/BackgroundImageFactory.kt +0 -365
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/BlurFactory.kt +0 -400
- package/dist/backgrounds/dark-office.d.ts +0 -3
- package/dist/backgrounds/dark-office.d.ts.map +0 -1
- package/dist/backgrounds/dark-office.js +0 -5
- package/dist/backgrounds/dark-office.js.map +0 -1
- package/dist/backgrounds/dark-office.web.d.ts +0 -3
- package/dist/backgrounds/dark-office.web.d.ts.map +0 -1
- package/dist/backgrounds/dark-office.web.js +0 -8
- package/dist/backgrounds/dark-office.web.js.map +0 -1
- package/dist/backgrounds/debug-resolutions.d.ts +0 -3
- package/dist/backgrounds/debug-resolutions.d.ts.map +0 -1
- package/dist/backgrounds/debug-resolutions.js +0 -6
- package/dist/backgrounds/debug-resolutions.js.map +0 -1
- package/dist/backgrounds/debug-resolutions.web.d.ts +0 -3
- package/dist/backgrounds/debug-resolutions.web.d.ts.map +0 -1
- package/dist/backgrounds/debug-resolutions.web.js +0 -8
- package/dist/backgrounds/debug-resolutions.web.js.map +0 -1
- package/dist/backgrounds/home-dark.d.ts +0 -3
- package/dist/backgrounds/home-dark.d.ts.map +0 -1
- package/dist/backgrounds/home-dark.js +0 -5
- package/dist/backgrounds/home-dark.js.map +0 -1
- package/dist/backgrounds/home-dark.web.d.ts +0 -3
- package/dist/backgrounds/home-dark.web.d.ts.map +0 -1
- package/dist/backgrounds/home-dark.web.js +0 -6
- package/dist/backgrounds/home-dark.web.js.map +0 -1
- package/dist/backgrounds/home-light.d.ts +0 -3
- package/dist/backgrounds/home-light.d.ts.map +0 -1
- package/dist/backgrounds/home-light.js +0 -5
- package/dist/backgrounds/home-light.js.map +0 -1
- package/dist/backgrounds/home-light.web.d.ts +0 -3
- package/dist/backgrounds/home-light.web.d.ts.map +0 -1
- package/dist/backgrounds/home-light.web.js +0 -6
- package/dist/backgrounds/home-light.web.js.map +0 -1
- package/dist/backgrounds/index.d.ts +0 -3
- package/dist/backgrounds/index.d.ts.map +0 -1
- package/dist/backgrounds/index.js +0 -6
- package/dist/backgrounds/index.js.map +0 -1
- package/dist/backgrounds/light-office.d.ts +0 -3
- package/dist/backgrounds/light-office.d.ts.map +0 -1
- package/dist/backgrounds/light-office.js +0 -5
- package/dist/backgrounds/light-office.js.map +0 -1
- package/dist/backgrounds/light-office.web.d.ts +0 -3
- package/dist/backgrounds/light-office.web.d.ts.map +0 -1
- package/dist/backgrounds/light-office.web.js +0 -8
- package/dist/backgrounds/light-office.web.js.map +0 -1
- package/dist/backgrounds/nature-dark.d.ts +0 -3
- package/dist/backgrounds/nature-dark.d.ts.map +0 -1
- package/dist/backgrounds/nature-dark.js +0 -5
- package/dist/backgrounds/nature-dark.js.map +0 -1
- package/dist/backgrounds/nature-dark.web.d.ts +0 -3
- package/dist/backgrounds/nature-dark.web.d.ts.map +0 -1
- package/dist/backgrounds/nature-dark.web.js +0 -6
- package/dist/backgrounds/nature-dark.web.js.map +0 -1
- package/dist/backgrounds/nature-light.d.ts +0 -3
- package/dist/backgrounds/nature-light.d.ts.map +0 -1
- package/dist/backgrounds/nature-light.js +0 -5
- package/dist/backgrounds/nature-light.js.map +0 -1
- package/dist/backgrounds/nature-light.web.d.ts +0 -3
- package/dist/backgrounds/nature-light.web.d.ts.map +0 -1
- package/dist/backgrounds/nature-light.web.js +0 -6
- package/dist/backgrounds/nature-light.web.js.map +0 -1
- package/dist/backgrounds/preset-source.types.d.ts +0 -2
- package/dist/backgrounds/preset-source.types.d.ts.map +0 -1
- package/dist/backgrounds/preset-source.types.js +0 -2
- package/dist/backgrounds/preset-source.types.js.map +0 -1
- package/dist/backgrounds/presets.d.ts +0 -3
- package/dist/backgrounds/presets.d.ts.map +0 -1
- package/dist/backgrounds/presets.js +0 -34
- package/dist/backgrounds/presets.js.map +0 -1
- package/dist/backgrounds/simiancraft-dark.d.ts +0 -3
- package/dist/backgrounds/simiancraft-dark.d.ts.map +0 -1
- package/dist/backgrounds/simiancraft-dark.js +0 -5
- package/dist/backgrounds/simiancraft-dark.js.map +0 -1
- package/dist/backgrounds/simiancraft-dark.web.d.ts +0 -3
- package/dist/backgrounds/simiancraft-dark.web.d.ts.map +0 -1
- package/dist/backgrounds/simiancraft-dark.web.js +0 -6
- package/dist/backgrounds/simiancraft-dark.web.js.map +0 -1
- package/dist/backgrounds/simiancraft-light.d.ts +0 -3
- package/dist/backgrounds/simiancraft-light.d.ts.map +0 -1
- package/dist/backgrounds/simiancraft-light.js +0 -5
- package/dist/backgrounds/simiancraft-light.js.map +0 -1
- package/dist/backgrounds/simiancraft-light.web.d.ts +0 -3
- package/dist/backgrounds/simiancraft-light.web.d.ts.map +0 -1
- package/dist/backgrounds/simiancraft-light.web.js +0 -6
- package/dist/backgrounds/simiancraft-light.web.js.map +0 -1
- package/dist/backgrounds/stylized-dark.d.ts +0 -3
- package/dist/backgrounds/stylized-dark.d.ts.map +0 -1
- package/dist/backgrounds/stylized-dark.js +0 -5
- package/dist/backgrounds/stylized-dark.js.map +0 -1
- package/dist/backgrounds/stylized-dark.web.d.ts +0 -3
- package/dist/backgrounds/stylized-dark.web.d.ts.map +0 -1
- package/dist/backgrounds/stylized-dark.web.js +0 -6
- package/dist/backgrounds/stylized-dark.web.js.map +0 -1
- package/dist/backgrounds/stylized-dark.webp +0 -0
- package/dist/backgrounds/stylized-light.d.ts +0 -3
- package/dist/backgrounds/stylized-light.d.ts.map +0 -1
- package/dist/backgrounds/stylized-light.js +0 -5
- package/dist/backgrounds/stylized-light.js.map +0 -1
- package/dist/backgrounds/stylized-light.web.d.ts +0 -3
- package/dist/backgrounds/stylized-light.web.d.ts.map +0 -1
- package/dist/backgrounds/stylized-light.web.js +0 -6
- package/dist/backgrounds/stylized-light.web.js.map +0 -1
- package/dist/index.d.ts +0 -42
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -155
- package/dist/index.js.map +0 -1
- package/dist/index.web.d.ts +0 -49
- package/dist/index.web.d.ts.map +0 -1
- package/dist/index.web.js +0 -113
- package/dist/index.web.js.map +0 -1
- package/dist/livekit.d.ts +0 -24
- package/dist/livekit.d.ts.map +0 -1
- package/dist/livekit.js +0 -57
- package/dist/livekit.js.map +0 -1
- package/dist/types.d.ts +0 -74
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +0 -1
- package/dist/web/blur-kernel.d.ts +0 -6
- package/dist/web/blur-kernel.d.ts.map +0 -1
- package/dist/web/blur-kernel.js +0 -41
- package/dist/web/blur-kernel.js.map +0 -1
- package/dist/web/effects/background-image.d.ts +0 -3
- package/dist/web/effects/background-image.d.ts.map +0 -1
- package/dist/web/effects/background-image.js +0 -284
- package/dist/web/effects/background-image.js.map +0 -1
- package/dist/web/effects/blur.d.ts +0 -3
- package/dist/web/effects/blur.d.ts.map +0 -1
- package/dist/web/effects/blur.js +0 -339
- package/dist/web/effects/blur.js.map +0 -1
- package/dist/web/effects/transform.d.ts +0 -4
- package/dist/web/effects/transform.d.ts.map +0 -1
- package/dist/web/effects/transform.js +0 -62
- package/dist/web/effects/transform.js.map +0 -1
- package/dist/web/insertable-streams.d.ts.map +0 -1
- package/dist/web/insertable-streams.js +0 -64
- package/dist/web/insertable-streams.js.map +0 -1
- package/dist/web/segmenter.d.ts.map +0 -1
- package/dist/web/segmenter.js +0 -83
- package/dist/web/segmenter.js.map +0 -1
- package/dist/web/shaders.d.ts +0 -2
- package/dist/web/shaders.d.ts.map +0 -1
- package/dist/web/shaders.generated.d.ts +0 -4
- package/dist/web/shaders.generated.d.ts.map +0 -1
- package/dist/web/shaders.generated.js +0 -54
- package/dist/web/shaders.generated.js.map +0 -1
- package/dist/web/shaders.js +0 -32
- package/dist/web/shaders.js.map +0 -1
- package/dist/web/tuning.d.ts.map +0 -1
- package/dist/web/tuning.js +0 -55
- package/dist/web/tuning.js.map +0 -1
- package/ios/KaleidoscopeModule/effects/BackgroundImageProcessor.swift +0 -293
- package/ios/KaleidoscopeModule/effects/BlurProcessor.swift +0 -238
- package/ios/KaleidoscopeModule/resources/backgrounds/dark-office.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/debug-resolutions.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/home-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/home-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/light-office.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/nature-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/nature-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/simiancraft-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/simiancraft-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/stylized-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/stylized-light.webp +0 -0
- package/ios/KaleidoscopeModule/shaders/blur.metalsrc +0 -72
- package/ios/KaleidoscopeModule/shaders/composite.metalsrc +0 -22
- package/src/backgrounds/README.md +0 -83
- package/src/backgrounds/dark-office.ts +0 -6
- package/src/backgrounds/dark-office.web.ts +0 -9
- package/src/backgrounds/dark-office.webp +0 -0
- package/src/backgrounds/debug-resolutions.ts +0 -7
- package/src/backgrounds/debug-resolutions.web.ts +0 -9
- package/src/backgrounds/debug-resolutions.webp +0 -0
- package/src/backgrounds/home-dark.ts +0 -6
- package/src/backgrounds/home-dark.web.ts +0 -7
- package/src/backgrounds/home-dark.webp +0 -0
- package/src/backgrounds/home-light.ts +0 -6
- package/src/backgrounds/home-light.web.ts +0 -7
- package/src/backgrounds/home-light.webp +0 -0
- package/src/backgrounds/index.ts +0 -7
- package/src/backgrounds/light-office.ts +0 -6
- package/src/backgrounds/light-office.web.ts +0 -9
- package/src/backgrounds/light-office.webp +0 -0
- package/src/backgrounds/nature-dark.ts +0 -6
- package/src/backgrounds/nature-dark.web.ts +0 -7
- package/src/backgrounds/nature-dark.webp +0 -0
- package/src/backgrounds/nature-light.ts +0 -6
- package/src/backgrounds/nature-light.web.ts +0 -7
- package/src/backgrounds/nature-light.webp +0 -0
- package/src/backgrounds/preset-source.types.ts +0 -5
- package/src/backgrounds/presets.ts +0 -36
- package/src/backgrounds/simiancraft-dark.ts +0 -6
- package/src/backgrounds/simiancraft-dark.web.ts +0 -7
- package/src/backgrounds/simiancraft-dark.webp +0 -0
- package/src/backgrounds/simiancraft-light.ts +0 -6
- package/src/backgrounds/simiancraft-light.web.ts +0 -7
- package/src/backgrounds/simiancraft-light.webp +0 -0
- package/src/backgrounds/stylized-dark.ts +0 -6
- package/src/backgrounds/stylized-dark.web.ts +0 -7
- package/src/backgrounds/stylized-dark.webp +0 -0
- package/src/backgrounds/stylized-light.ts +0 -6
- package/src/backgrounds/stylized-light.web.ts +0 -7
- package/src/backgrounds/stylized-light.webp +0 -0
- package/src/types.ts +0 -89
- package/src/web/blur-kernel.ts +0 -44
- package/src/web/effects/background-image.ts +0 -364
- package/src/web/effects/blur.ts +0 -430
- package/src/web/effects/transform.ts +0 -69
- package/src/web/insertable-streams.ts +0 -112
- package/src/web/segmenter.ts +0 -107
- package/src/web/shaders.generated.ts +0 -56
- package/src/web/shaders.ts +0 -31
- package/src/web/tuning.ts +0 -67
- /package/{src/backgrounds → catalog/images}/assets.d.ts +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/debug}/debug-resolutions.webp +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/home}/home-dark.webp +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/home}/home-light.webp +0 -0
- /package/{android/src/main/assets/backgrounds/nature-dark.webp → catalog/images/nature/landscape-dark.webp} +0 -0
- /package/{android/src/main/assets/backgrounds/nature-light.webp → catalog/images/nature/landscape-light.webp} +0 -0
- /package/{android/src/main/assets/backgrounds/dark-office.webp → catalog/images/office/office-dark.webp} +0 -0
- /package/{android/src/main/assets/backgrounds/light-office.webp → catalog/images/office/office-light.webp} +0 -0
- /package/{android/src/main/assets/backgrounds/stylized-light.webp → catalog/images/sci-fi/sci-fi-light.webp} +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/simiancraft}/simiancraft-dark.webp +0 -0
- /package/{android/src/main/assets/backgrounds → catalog/images/simiancraft}/simiancraft-light.webp +0 -0
- /package/dist/{backgrounds → catalog/images/debug}/debug-resolutions.webp +0 -0
- /package/dist/{backgrounds → catalog/images/home}/home-dark.webp +0 -0
- /package/dist/{backgrounds → catalog/images/home}/home-light.webp +0 -0
- /package/dist/{backgrounds/nature-dark.webp → catalog/images/nature/landscape-dark.webp} +0 -0
- /package/dist/{backgrounds/nature-light.webp → catalog/images/nature/landscape-light.webp} +0 -0
- /package/dist/{backgrounds/dark-office.webp → catalog/images/office/office-dark.webp} +0 -0
- /package/dist/{backgrounds/light-office.webp → catalog/images/office/office-light.webp} +0 -0
- /package/dist/{backgrounds/stylized-light.webp → catalog/images/sci-fi/sci-fi-light.webp} +0 -0
- /package/dist/{backgrounds → catalog/images/simiancraft}/simiancraft-dark.webp +0 -0
- /package/dist/{backgrounds → catalog/images/simiancraft}/simiancraft-light.webp +0 -0
- /package/dist/{web → web-driver}/insertable-streams.d.ts +0 -0
- /package/dist/{web → web-driver}/segmenter.d.ts +0 -0
- /package/dist/{web → web-driver}/tuning.d.ts +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Shared Metal renderer for the iOS Kaleidoscope effects. Owns the
|
|
2
2
|
// MTLDevice, command queue, the CVMetalTextureCache used for both input
|
|
3
3
|
// ingestion and output, the precompiled-at-runtime pipeline states for the
|
|
4
|
-
//
|
|
5
|
-
// CVPixelBufferPool
|
|
4
|
+
// passthrough vertex and the transform fragment, and an output
|
|
5
|
+
// CVPixelBufferPool. The per-layer composite fragments and the generative
|
|
6
|
+
// shaders compile lazily in CompositeProcessor.
|
|
6
7
|
//
|
|
7
|
-
// One instance is created per processor (
|
|
8
|
-
//
|
|
8
|
+
// One instance is created per processor (CompositeProcessor, TransformProcessor);
|
|
9
|
+
// a processor's `capturer:didCaptureVideoFrame:` is the only
|
|
9
10
|
// caller, and the upstream rn-webrtc pipeline serializes per processor on a
|
|
10
11
|
// single capture queue, so the renderer does not need its own lock. The
|
|
11
12
|
// owning processor still wraps every call in its own try/catch and falls
|
|
@@ -30,572 +31,500 @@
|
|
|
30
31
|
// cannot introduce a vertical flip. This is the verification anchor for the
|
|
31
32
|
// whole convention.
|
|
32
33
|
|
|
34
|
+
import CoreVideo
|
|
33
35
|
import Foundation
|
|
34
36
|
import Metal
|
|
35
|
-
import CoreVideo
|
|
36
|
-
import simd
|
|
37
37
|
import os.log
|
|
38
|
+
import simd
|
|
38
39
|
|
|
39
40
|
/// Errors thrown during renderer setup or per-frame work. The owning
|
|
40
41
|
/// processor catches these and falls through to the original frame.
|
|
41
42
|
enum RendererError: Error {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
case noMetalDevice
|
|
44
|
+
case libraryCompileFailed(String)
|
|
45
|
+
case missingFunction(String)
|
|
46
|
+
case pipelineCreateFailed(String)
|
|
47
|
+
case textureCacheCreateFailed(OSStatus)
|
|
48
|
+
case pixelBufferPoolCreateFailed(OSStatus)
|
|
49
|
+
case pixelBufferAllocFailed(OSStatus)
|
|
50
|
+
case textureBindFailed(String)
|
|
51
|
+
case commandBufferUnavailable
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
final class MetalRenderer {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
55
|
+
static let log = OSLog(subsystem: "com.simiancraft.kaleidoscope", category: "Renderer")
|
|
56
|
+
static let perfLog = OSLog(subsystem: "com.simiancraft.kaleidoscope", category: "Perf")
|
|
57
|
+
|
|
58
|
+
let device: MTLDevice
|
|
59
|
+
private let commandQueue: MTLCommandQueue
|
|
60
|
+
let textureCache: CVMetalTextureCache
|
|
61
|
+
|
|
62
|
+
/// R3 frame-pipelining. Instead of committing the current command buffer and
|
|
63
|
+
/// blocking on waitUntilCompleted (which serializes CPU and GPU every frame),
|
|
64
|
+
/// we commit asynchronously and return the PREVIOUS frame's completed output,
|
|
65
|
+
/// adding one frame of latency. The semaphore caps the number of command
|
|
66
|
+
/// buffers in flight so the CPU cannot outrun the GPU unboundedly; value 2
|
|
67
|
+
/// lets the GPU work on frame N while the CPU encodes frame N+1. The output
|
|
68
|
+
/// CVPixelBufferPool (min 3) has enough buffers to back the in-flight frame,
|
|
69
|
+
/// the held previous frame, and one being dequeued.
|
|
70
|
+
private let inFlightSemaphore = DispatchSemaphore(value: 2)
|
|
71
|
+
|
|
72
|
+
// The most recent output buffer whose GPU work has COMPLETED, published by
|
|
73
|
+
// the command-buffer completion handler. The capture thread reads it to
|
|
74
|
+
// return last frame's result while this frame's work runs asynchronously.
|
|
75
|
+
// nil before the first frame completes; the caller forwards the original
|
|
76
|
+
// frame in that case. Publishing only on completion (rather than relying on
|
|
77
|
+
// the semaphore + in-order queue to imply completion) means a returned buffer
|
|
78
|
+
// is never read by WebRTC before the GPU finished writing it: the buffer-
|
|
79
|
+
// lifecycle safety is explicit, not timing-derived. Shared between the
|
|
80
|
+
// completion handler (writer) and the capture thread (reader); guarded by
|
|
81
|
+
// pipelineLock.
|
|
82
|
+
private var readyOutput: CVPixelBuffer?
|
|
83
|
+
private var pipelineLock = os_unfair_lock_s()
|
|
84
|
+
|
|
85
|
+
// Pipeline states for the three transpiled shaders. All three .metal files
|
|
86
|
+
// share the entry-point name `main0` (spirv-cross emits that for every
|
|
87
|
+
// stage), so they CANNOT coexist in one MTLLibrary. Each is compiled into
|
|
88
|
+
// its OWN MTLLibrary at runtime from the .metal source text read out of the
|
|
89
|
+
// Kaleidoscope resource bundle, and we pull `main0` from each. See
|
|
90
|
+
// ShaderLibrary.swift for the loader. Runtime makeLibrary(source:) is the
|
|
91
|
+
// safe path here because renaming the entry points would be clobbered the
|
|
92
|
+
// next time scripts/transpile-shaders.ts regenerates the MSL.
|
|
93
|
+
let passthroughVertex: MTLFunction
|
|
94
|
+
let transformPipeline: MTLRenderPipelineState
|
|
95
|
+
|
|
96
|
+
/// Linear-clamp sampler shared by every pass (matches the Android GL_LINEAR
|
|
97
|
+
/// + GL_CLAMP_TO_EDGE setup). Clamp avoids edge bleed when cover-fit UVs or
|
|
98
|
+
/// blur taps reach outside [0,1].
|
|
99
|
+
let linearClampSampler: MTLSamplerState
|
|
100
|
+
|
|
101
|
+
// Output pool + cached dimensions. Recreated on resolution change.
|
|
102
|
+
private var outputPool: CVPixelBufferPool?
|
|
103
|
+
private var poolWidth = 0
|
|
104
|
+
private var poolHeight = 0
|
|
105
|
+
|
|
106
|
+
// Composite compositor scratch render targets (BGRA, full output resolution).
|
|
107
|
+
// scratchA holds a subject layer's rendered content and the blur's horizontal
|
|
108
|
+
// pass; scratchB holds the blur's vertical pass. Recreated on resolution
|
|
109
|
+
// change; allocated only when the composite compositor's scratch path runs. Used
|
|
110
|
+
// via the CompositeRendering extension's compositeScratch(width:height:); kept
|
|
111
|
+
// distinct from the standalone blur ping-pong above so the two paths never
|
|
112
|
+
// alias. `internal` (not private) so the extension in CompositeRendering.swift
|
|
113
|
+
// can reach them; a Swift extension cannot add stored properties, so they live
|
|
114
|
+
// on the class here.
|
|
115
|
+
var compositeScratchA: MTLTexture?
|
|
116
|
+
var compositeScratchB: MTLTexture?
|
|
117
|
+
var compositeScratchWidth = 0
|
|
118
|
+
var compositeScratchHeight = 0
|
|
119
|
+
|
|
120
|
+
// "original" RGB ingest buffers come from a POOL, not a single reused buffer.
|
|
121
|
+
// CoreImage renders each frame's NV12 input into a freshly dequeued buffer
|
|
122
|
+
// (TextureBridge.ingest) and the GPU passes sample a per-frame texture view of
|
|
123
|
+
// it. A single shared buffer is WRONG here: under R3 frame-pipelining the
|
|
124
|
+
// previous frame's command buffer is still reading the original after
|
|
125
|
+
// process() returns, AND the segmenter's async worker still reads it (it
|
|
126
|
+
// retains the ref for its downscale), so overwriting one buffer in place
|
|
127
|
+
// corrupted those in-flight reads (the mask drift / "fog of war"). A pool only
|
|
128
|
+
// recycles a buffer once every reader has released it: the command buffer via
|
|
129
|
+
// commitPipelined's keepAlive, the segmenter via its async closure's retain.
|
|
130
|
+
private var originalPool: CVPixelBufferPool?
|
|
131
|
+
private var originalPoolWidth = 0
|
|
132
|
+
private var originalPoolHeight = 0
|
|
133
|
+
|
|
134
|
+
init(bundle: Bundle) throws {
|
|
135
|
+
guard let dev = MTLCreateSystemDefaultDevice() else {
|
|
136
|
+
throw RendererError.noMetalDevice
|
|
137
|
+
}
|
|
138
|
+
device = dev
|
|
139
|
+
|
|
140
|
+
guard let queue = dev.makeCommandQueue() else {
|
|
141
|
+
throw RendererError.pipelineCreateFailed("makeCommandQueue returned nil")
|
|
142
|
+
}
|
|
143
|
+
commandQueue = queue
|
|
144
|
+
|
|
145
|
+
var cache: CVMetalTextureCache?
|
|
146
|
+
let cacheStatus = CVMetalTextureCacheCreate(kCFAllocatorDefault, nil, dev, nil, &cache)
|
|
147
|
+
guard cacheStatus == kCVReturnSuccess, let unwrappedCache = cache else {
|
|
148
|
+
throw RendererError.textureCacheCreateFailed(cacheStatus)
|
|
149
|
+
}
|
|
150
|
+
textureCache = unwrappedCache
|
|
151
|
+
|
|
152
|
+
// Compile each .metal as its own library and pull `main0`.
|
|
153
|
+
let passthrough = try ShaderLibrary(device: dev, bundle: bundle, fileName: "passthrough")
|
|
154
|
+
let transform = try ShaderLibrary(device: dev, bundle: bundle, fileName: "transform")
|
|
155
|
+
|
|
156
|
+
passthroughVertex = try passthrough.function()
|
|
157
|
+
|
|
158
|
+
// The transform fragment pipeline reuses the passthrough vertex (fullscreen
|
|
159
|
+
// quad generated from gl_VertexID via TRIANGLE_STRIP; no vertex buffer).
|
|
160
|
+
// The shader is designed for FOUR vertices (see shaders/passthrough.vert);
|
|
161
|
+
// see drawFullscreen below for the matching drawPrimitives call. The
|
|
162
|
+
// per-layer composite fragments and the composite blur compile lazily in
|
|
163
|
+
// CompositeProcessor; the generative fragments via makeGenerativePipeline.
|
|
164
|
+
transformPipeline = try MetalRenderer.makePipeline(
|
|
165
|
+
device: dev,
|
|
166
|
+
vertex: passthroughVertex,
|
|
167
|
+
fragment: transform.function(),
|
|
168
|
+
label: "transform"
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
let samplerDesc = MTLSamplerDescriptor()
|
|
172
|
+
samplerDesc.minFilter = .linear
|
|
173
|
+
samplerDesc.magFilter = .linear
|
|
174
|
+
samplerDesc.sAddressMode = .clampToEdge
|
|
175
|
+
samplerDesc.tAddressMode = .clampToEdge
|
|
176
|
+
guard let sampler = dev.makeSamplerState(descriptor: samplerDesc) else {
|
|
177
|
+
throw RendererError.pipelineCreateFailed("makeSamplerState returned nil")
|
|
178
|
+
}
|
|
179
|
+
linearClampSampler = sampler
|
|
131
180
|
}
|
|
132
|
-
self.device = dev
|
|
133
181
|
|
|
134
|
-
|
|
135
|
-
|
|
182
|
+
private static func makePipeline(
|
|
183
|
+
device: MTLDevice,
|
|
184
|
+
vertex: MTLFunction,
|
|
185
|
+
fragment: MTLFunction,
|
|
186
|
+
label: String
|
|
187
|
+
) throws -> MTLRenderPipelineState {
|
|
188
|
+
let desc = MTLRenderPipelineDescriptor()
|
|
189
|
+
desc.label = label
|
|
190
|
+
desc.vertexFunction = vertex
|
|
191
|
+
desc.fragmentFunction = fragment
|
|
192
|
+
// All passes render into BGRA buffers (intermediates and the output).
|
|
193
|
+
desc.colorAttachments[0].pixelFormat = .bgra8Unorm
|
|
194
|
+
do {
|
|
195
|
+
return try device.makeRenderPipelineState(descriptor: desc)
|
|
196
|
+
} catch {
|
|
197
|
+
throw RendererError.pipelineCreateFailed("\(label): \(error.localizedDescription)")
|
|
198
|
+
}
|
|
136
199
|
}
|
|
137
|
-
self.commandQueue = queue
|
|
138
200
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
self.textureCache = unwrappedCache
|
|
145
|
-
|
|
146
|
-
// Compile each .metal as its own library and pull `main0`.
|
|
147
|
-
let passthrough = try ShaderLibrary(device: dev, bundle: bundle, fileName: "passthrough")
|
|
148
|
-
let blur = try ShaderLibrary(device: dev, bundle: bundle, fileName: "blur")
|
|
149
|
-
let composite = try ShaderLibrary(device: dev, bundle: bundle, fileName: "composite")
|
|
150
|
-
let transform = try ShaderLibrary(device: dev, bundle: bundle, fileName: "transform")
|
|
151
|
-
|
|
152
|
-
self.passthroughVertex = try passthrough.function()
|
|
153
|
-
|
|
154
|
-
// Both fragment pipelines reuse the passthrough vertex (fullscreen
|
|
155
|
-
// quad generated from gl_VertexID via TRIANGLE_STRIP; no vertex buffer).
|
|
156
|
-
// The shader is designed for FOUR vertices (see shaders/passthrough.vert);
|
|
157
|
-
// see drawFullscreen below for the matching drawPrimitives call.
|
|
158
|
-
self.blurPipeline = try MetalRenderer.makePipeline(
|
|
159
|
-
device: dev,
|
|
160
|
-
vertex: passthroughVertex,
|
|
161
|
-
fragment: try blur.function(),
|
|
162
|
-
label: "blur"
|
|
163
|
-
)
|
|
164
|
-
self.compositePipeline = try MetalRenderer.makePipeline(
|
|
165
|
-
device: dev,
|
|
166
|
-
vertex: passthroughVertex,
|
|
167
|
-
fragment: try composite.function(),
|
|
168
|
-
label: "composite"
|
|
169
|
-
)
|
|
170
|
-
self.transformPipeline = try MetalRenderer.makePipeline(
|
|
171
|
-
device: dev,
|
|
172
|
-
vertex: passthroughVertex,
|
|
173
|
-
fragment: try transform.function(),
|
|
174
|
-
label: "transform"
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
let samplerDesc = MTLSamplerDescriptor()
|
|
178
|
-
samplerDesc.minFilter = .linear
|
|
179
|
-
samplerDesc.magFilter = .linear
|
|
180
|
-
samplerDesc.sAddressMode = .clampToEdge
|
|
181
|
-
samplerDesc.tAddressMode = .clampToEdge
|
|
182
|
-
guard let sampler = dev.makeSamplerState(descriptor: samplerDesc) else {
|
|
183
|
-
throw RendererError.pipelineCreateFailed("makeSamplerState returned nil")
|
|
184
|
-
}
|
|
185
|
-
self.linearClampSampler = sampler
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
private static func makePipeline(
|
|
189
|
-
device: MTLDevice,
|
|
190
|
-
vertex: MTLFunction,
|
|
191
|
-
fragment: MTLFunction,
|
|
192
|
-
label: String
|
|
193
|
-
) throws -> MTLRenderPipelineState {
|
|
194
|
-
let desc = MTLRenderPipelineDescriptor()
|
|
195
|
-
desc.label = label
|
|
196
|
-
desc.vertexFunction = vertex
|
|
197
|
-
desc.fragmentFunction = fragment
|
|
198
|
-
// All passes render into BGRA buffers (intermediates and the output).
|
|
199
|
-
desc.colorAttachments[0].pixelFormat = .bgra8Unorm
|
|
200
|
-
do {
|
|
201
|
-
return try device.makeRenderPipelineState(descriptor: desc)
|
|
202
|
-
} catch {
|
|
203
|
-
throw RendererError.pipelineCreateFailed("\(label): \(error.localizedDescription)")
|
|
201
|
+
func makeCommandBuffer() throws -> MTLCommandBuffer {
|
|
202
|
+
guard let cb = commandQueue.makeCommandBuffer() else {
|
|
203
|
+
throw RendererError.commandBufferUnavailable
|
|
204
|
+
}
|
|
205
|
+
return cb
|
|
204
206
|
}
|
|
205
|
-
}
|
|
206
207
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
commandBuffer.commit()
|
|
275
|
-
|
|
276
|
-
os_unfair_lock_lock(&pipelineLock)
|
|
277
|
-
let previous = readyOutput
|
|
278
|
-
os_unfair_lock_unlock(&pipelineLock)
|
|
279
|
-
return previous
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
// MARK: - Output buffer pool
|
|
283
|
-
|
|
284
|
-
/// Returns a fresh BGRA, IOSurface-backed, Metal-compatible CVPixelBuffer
|
|
285
|
-
/// from the pool, recreating the pool if dimensions changed. The pool keeps
|
|
286
|
-
/// allocation off the per-frame hot path; the buffer is owned by the caller
|
|
287
|
-
/// and released when the RTCVideoFrame that wraps it is released.
|
|
288
|
-
func dequeueOutputBuffer(width: Int, height: Int) throws -> CVPixelBuffer {
|
|
289
|
-
if outputPool == nil || poolWidth != width || poolHeight != height {
|
|
290
|
-
try rebuildOutputPool(width: width, height: height)
|
|
291
|
-
}
|
|
292
|
-
guard let pool = outputPool else {
|
|
293
|
-
throw RendererError.pixelBufferPoolCreateFailed(kCVReturnError)
|
|
294
|
-
}
|
|
295
|
-
var pixelBuffer: CVPixelBuffer?
|
|
296
|
-
let status = CVPixelBufferPoolCreatePixelBuffer(kCFAllocatorDefault, pool, &pixelBuffer)
|
|
297
|
-
guard status == kCVReturnSuccess, let buffer = pixelBuffer else {
|
|
298
|
-
throw RendererError.pixelBufferAllocFailed(status)
|
|
299
|
-
}
|
|
300
|
-
return buffer
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
private func rebuildOutputPool(width: Int, height: Int) throws {
|
|
304
|
-
// min 4 covers the worst-case live set now that the completion handler
|
|
305
|
-
// retains `currentOutput` until the GPU finishes: the semaphore (value 2)
|
|
306
|
-
// permits TWO command buffers in flight, so two distinct `currentOutput`
|
|
307
|
-
// buffers can be captured at once, PLUS the previously-published
|
|
308
|
-
// `readyOutput` the capture thread may still be handing to WebRTC, PLUS the
|
|
309
|
-
// one being dequeued this frame. 2 + 1 + 1 = 4. The pool grows past the
|
|
310
|
-
// minimum if all are momentarily live, so 4 is the steady-state floor, not a
|
|
311
|
-
// hard cap.
|
|
312
|
-
outputPool = try MetalRenderer.makeBGRAMetalPool(width: width, height: height, minCount: 4)
|
|
313
|
-
poolWidth = width
|
|
314
|
-
poolHeight = height
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/// Creates a CVPixelBufferPool of BGRA, IOSurface-backed, Metal-compatible
|
|
318
|
-
/// buffers. Shared by the output pool and the original-ingest pool. IOSurface-
|
|
319
|
-
/// backed so downstream (RTCCVPixelBuffer -> I420 -> encoder) accepts the
|
|
320
|
-
/// buffer; Metal-compatible so CVMetalTextureCache can wrap it as a texture
|
|
321
|
-
/// without a copy. Pools grow past `minCount` if more buffers are momentarily
|
|
322
|
-
/// live, so the count is a steady-state floor, not a hard cap.
|
|
323
|
-
private static func makeBGRAMetalPool(width: Int, height: Int, minCount: Int) throws
|
|
324
|
-
-> CVPixelBufferPool {
|
|
325
|
-
let pixelBufferAttributes: [String: Any] = [
|
|
326
|
-
kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA,
|
|
327
|
-
kCVPixelBufferWidthKey as String: width,
|
|
328
|
-
kCVPixelBufferHeightKey as String: height,
|
|
329
|
-
kCVPixelBufferIOSurfacePropertiesKey as String: [String: Any](),
|
|
330
|
-
kCVPixelBufferMetalCompatibilityKey as String: true,
|
|
331
|
-
]
|
|
332
|
-
let poolAttributes: [String: Any] = [
|
|
333
|
-
kCVPixelBufferPoolMinimumBufferCountKey as String: minCount,
|
|
334
|
-
]
|
|
335
|
-
var pool: CVPixelBufferPool?
|
|
336
|
-
let status = CVPixelBufferPoolCreate(
|
|
337
|
-
kCFAllocatorDefault,
|
|
338
|
-
poolAttributes as CFDictionary,
|
|
339
|
-
pixelBufferAttributes as CFDictionary,
|
|
340
|
-
&pool
|
|
341
|
-
)
|
|
342
|
-
guard status == kCVReturnSuccess, let createdPool = pool else {
|
|
343
|
-
throw RendererError.pixelBufferPoolCreateFailed(status)
|
|
208
|
+
/// R3 frame-pipelining commit. Replaces `commit()` + `waitUntilCompleted()`.
|
|
209
|
+
///
|
|
210
|
+
/// - Throttles in-flight command buffers via the semaphore (waits before
|
|
211
|
+
/// commit; the completion handler signals), so the CPU cannot outrun the
|
|
212
|
+
/// GPU unboundedly. The literal R3 sketch waits "before encoding"; we wait
|
|
213
|
+
/// here, immediately before commit, which bounds the GPU-relevant quantity
|
|
214
|
+
/// (committed-but-incomplete buffers) identically and keeps the throttle in
|
|
215
|
+
/// one place. The processor's per-frame work between makeCommandBuffer and
|
|
216
|
+
/// this call is cheap CPU encoding, not GPU execution.
|
|
217
|
+
/// - Registers a completion handler that PUBLISHES `currentOutput` as the
|
|
218
|
+
/// ready-to-return buffer only once the GPU has finished writing it, then
|
|
219
|
+
/// signals the semaphore. Optionally logs GPU time under "Perf".
|
|
220
|
+
/// - Commits asynchronously (no wait) and returns the PREVIOUSLY-published
|
|
221
|
+
/// output, i.e. last frame's completed result. Returns nil before any frame
|
|
222
|
+
/// has completed (first frame); the caller forwards the original frame.
|
|
223
|
+
///
|
|
224
|
+
/// `currentOutput` must be the pooled buffer the command buffer wrote into
|
|
225
|
+
/// this frame. The returned buffer (last frame's) is a distinct pooled buffer;
|
|
226
|
+
/// the pool's min count keeps current, previously-returned, and in-flight
|
|
227
|
+
/// buffers from colliding.
|
|
228
|
+
///
|
|
229
|
+
/// `keepAlive` holds any per-frame references whose backing the GPU reads or
|
|
230
|
+
/// writes for this command buffer but which would otherwise be released when
|
|
231
|
+
/// the encoding frame returns: the input/mask CVPixelBuffers AND the
|
|
232
|
+
/// CVMetalTexture wrappers vended by TextureBridge.makeTexture (the wrapper, not
|
|
233
|
+
/// the bare MTLTexture, is what pins the IOSurface for the cache). Under R3 the
|
|
234
|
+
/// command buffer is still in flight after process() returns, so capturing these
|
|
235
|
+
/// in the completion handler keeps them live for exactly as long as the GPU
|
|
236
|
+
/// needs them and no longer; without this the source pool can reclaim and
|
|
237
|
+
/// overwrite a buffer mid-GPU-read (the segmentation-mask curl-noise drift).
|
|
238
|
+
func commitPipelined(
|
|
239
|
+
_ commandBuffer: MTLCommandBuffer,
|
|
240
|
+
currentOutput: CVPixelBuffer,
|
|
241
|
+
keepAlive: [Any],
|
|
242
|
+
debugTiming: Bool,
|
|
243
|
+
timingLabel: String
|
|
244
|
+
) -> CVPixelBuffer? {
|
|
245
|
+
inFlightSemaphore.wait()
|
|
246
|
+
commandBuffer.addCompletedHandler { [weak self] completed in
|
|
247
|
+
// Hold the per-frame inputs/wrappers until the GPU finishes. Referencing
|
|
248
|
+
// `keepAlive` inside the closure is the entire point: it extends their
|
|
249
|
+
// lifetime to command-buffer completion. Touched but intentionally unused.
|
|
250
|
+
_ = keepAlive
|
|
251
|
+
guard let self else { return }
|
|
252
|
+
if debugTiming {
|
|
253
|
+
let gpuMs = (completed.gpuEndTime - completed.gpuStartTime) * 1000.0
|
|
254
|
+
os_log("%{public}@ gpu: %.2f ms", log: MetalRenderer.perfLog, type: .info,
|
|
255
|
+
timingLabel, gpuMs)
|
|
256
|
+
}
|
|
257
|
+
if completed.error == nil {
|
|
258
|
+
os_unfair_lock_lock(&pipelineLock)
|
|
259
|
+
readyOutput = currentOutput
|
|
260
|
+
os_unfair_lock_unlock(&pipelineLock)
|
|
261
|
+
} else {
|
|
262
|
+
os_log("%{public}@ command buffer error: %{public}@",
|
|
263
|
+
log: MetalRenderer.log, type: .error,
|
|
264
|
+
timingLabel, completed.error?.localizedDescription ?? "unknown")
|
|
265
|
+
}
|
|
266
|
+
inFlightSemaphore.signal()
|
|
267
|
+
}
|
|
268
|
+
commandBuffer.commit()
|
|
269
|
+
|
|
270
|
+
os_unfair_lock_lock(&pipelineLock)
|
|
271
|
+
let previous = readyOutput
|
|
272
|
+
os_unfair_lock_unlock(&pipelineLock)
|
|
273
|
+
return previous
|
|
344
274
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
// pinned via keepAlive) + 1 the segmenter's async worker still holds + 1
|
|
366
|
-
// dequeued this frame. The CVMetalTexture wrapper does not occupy its own
|
|
367
|
-
// pool slot (it pins the same buffer's IOSurface). 5 leaves one of
|
|
368
|
-
// headroom; the pool grows past the floor on demand regardless.
|
|
369
|
-
originalPool = try MetalRenderer.makeBGRAMetalPool(width: width, height: height, minCount: 5)
|
|
370
|
-
originalPoolWidth = width
|
|
371
|
-
originalPoolHeight = height
|
|
372
|
-
}
|
|
373
|
-
guard let pool = originalPool else {
|
|
374
|
-
throw RendererError.pixelBufferPoolCreateFailed(kCVReturnError)
|
|
275
|
+
|
|
276
|
+
// MARK: - Output buffer pool
|
|
277
|
+
|
|
278
|
+
/// Returns a fresh BGRA, IOSurface-backed, Metal-compatible CVPixelBuffer
|
|
279
|
+
/// from the pool, recreating the pool if dimensions changed. The pool keeps
|
|
280
|
+
/// allocation off the per-frame hot path; the buffer is owned by the caller
|
|
281
|
+
/// and released when the RTCVideoFrame that wraps it is released.
|
|
282
|
+
func dequeueOutputBuffer(width: Int, height: Int) throws -> CVPixelBuffer {
|
|
283
|
+
if outputPool == nil || poolWidth != width || poolHeight != height {
|
|
284
|
+
try rebuildOutputPool(width: width, height: height)
|
|
285
|
+
}
|
|
286
|
+
guard let pool = outputPool else {
|
|
287
|
+
throw RendererError.pixelBufferPoolCreateFailed(kCVReturnError)
|
|
288
|
+
}
|
|
289
|
+
var pixelBuffer: CVPixelBuffer?
|
|
290
|
+
let status = CVPixelBufferPoolCreatePixelBuffer(kCFAllocatorDefault, pool, &pixelBuffer)
|
|
291
|
+
guard status == kCVReturnSuccess, let buffer = pixelBuffer else {
|
|
292
|
+
throw RendererError.pixelBufferAllocFailed(status)
|
|
293
|
+
}
|
|
294
|
+
return buffer
|
|
375
295
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
296
|
+
|
|
297
|
+
private func rebuildOutputPool(width: Int, height: Int) throws {
|
|
298
|
+
// min 4 covers the worst-case live set now that the completion handler
|
|
299
|
+
// retains `currentOutput` until the GPU finishes: the semaphore (value 2)
|
|
300
|
+
// permits TWO command buffers in flight, so two distinct `currentOutput`
|
|
301
|
+
// buffers can be captured at once, PLUS the previously-published
|
|
302
|
+
// `readyOutput` the capture thread may still be handing to WebRTC, PLUS the
|
|
303
|
+
// one being dequeued this frame. 2 + 1 + 1 = 4. The pool grows past the
|
|
304
|
+
// minimum if all are momentarily live, so 4 is the steady-state floor, not a
|
|
305
|
+
// hard cap.
|
|
306
|
+
outputPool = try MetalRenderer.makeBGRAMetalPool(width: width, height: height, minCount: 4)
|
|
307
|
+
poolWidth = width
|
|
308
|
+
poolHeight = height
|
|
380
309
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
310
|
+
|
|
311
|
+
/// Creates a CVPixelBufferPool of BGRA, IOSurface-backed, Metal-compatible
|
|
312
|
+
/// buffers. Shared by the output pool and the original-ingest pool. IOSurface-
|
|
313
|
+
/// backed so downstream (RTCCVPixelBuffer -> I420 -> encoder) accepts the
|
|
314
|
+
/// buffer; Metal-compatible so CVMetalTextureCache can wrap it as a texture
|
|
315
|
+
/// without a copy. Pools grow past `minCount` if more buffers are momentarily
|
|
316
|
+
/// live, so the count is a steady-state floor, not a hard cap.
|
|
317
|
+
private static func makeBGRAMetalPool(width: Int, height: Int, minCount: Int) throws
|
|
318
|
+
-> CVPixelBufferPool
|
|
319
|
+
{
|
|
320
|
+
let pixelBufferAttributes: [String: Any] = [
|
|
321
|
+
kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA,
|
|
322
|
+
kCVPixelBufferWidthKey as String: width,
|
|
323
|
+
kCVPixelBufferHeightKey as String: height,
|
|
324
|
+
kCVPixelBufferIOSurfacePropertiesKey as String: [String: Any](),
|
|
325
|
+
kCVPixelBufferMetalCompatibilityKey as String: true
|
|
326
|
+
]
|
|
327
|
+
let poolAttributes: [String: Any] = [
|
|
328
|
+
kCVPixelBufferPoolMinimumBufferCountKey as String: minCount
|
|
329
|
+
]
|
|
330
|
+
var pool: CVPixelBufferPool?
|
|
331
|
+
let status = CVPixelBufferPoolCreate(
|
|
332
|
+
kCFAllocatorDefault,
|
|
333
|
+
poolAttributes as CFDictionary,
|
|
334
|
+
pixelBufferAttributes as CFDictionary,
|
|
335
|
+
&pool
|
|
336
|
+
)
|
|
337
|
+
guard status == kCVReturnSuccess, let createdPool = pool else {
|
|
338
|
+
throw RendererError.pixelBufferPoolCreateFailed(status)
|
|
339
|
+
}
|
|
340
|
+
return createdPool
|
|
395
341
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
342
|
+
|
|
343
|
+
// MARK: - Intermediate textures
|
|
344
|
+
|
|
345
|
+
/// Dequeues a fresh "original" ingest buffer (BGRA, IOSurface-backed,
|
|
346
|
+
/// Metal-compatible) from the pool and returns it with a per-frame Metal
|
|
347
|
+
/// texture view and the CVMetalTexture wrapper that pins it to the IOSurface.
|
|
348
|
+
/// The CVPixelBuffer is the CoreImage render target; the MTLTexture is a
|
|
349
|
+
/// zero-copy view of the same IOSurface.
|
|
350
|
+
///
|
|
351
|
+
/// The caller MUST keep `buffer` and `wrapper` alive until its command buffer
|
|
352
|
+
/// completes (pass both in commitPipelined's keepAlive); the segmenter
|
|
353
|
+
/// separately retains the buffer for its async read. The pool will not recycle
|
|
354
|
+
/// the buffer until both readers release it. See the originalPool field
|
|
355
|
+
/// comment for why this is pooled and not a single reused buffer.
|
|
356
|
+
func originalIngestTarget(width: Int, height: Int) throws
|
|
357
|
+
-> (buffer: CVPixelBuffer, texture: MTLTexture, wrapper: CVMetalTexture)
|
|
358
|
+
{
|
|
359
|
+
if originalPool == nil || originalPoolWidth != width || originalPoolHeight != height {
|
|
360
|
+
// Worst-case live set is 4: 2 GPU-in-flight (semaphore value 2, each
|
|
361
|
+
// pinned via keepAlive) + 1 the segmenter's async worker still holds + 1
|
|
362
|
+
// dequeued this frame. The CVMetalTexture wrapper does not occupy its own
|
|
363
|
+
// pool slot (it pins the same buffer's IOSurface). 5 leaves one of
|
|
364
|
+
// headroom; the pool grows past the floor on demand regardless.
|
|
365
|
+
originalPool = try MetalRenderer.makeBGRAMetalPool(width: width, height: height, minCount: 5)
|
|
366
|
+
originalPoolWidth = width
|
|
367
|
+
originalPoolHeight = height
|
|
368
|
+
}
|
|
369
|
+
guard let pool = originalPool else {
|
|
370
|
+
throw RendererError.pixelBufferPoolCreateFailed(kCVReturnError)
|
|
371
|
+
}
|
|
372
|
+
var pixelBuffer: CVPixelBuffer?
|
|
373
|
+
let status = CVPixelBufferPoolCreatePixelBuffer(kCFAllocatorDefault, pool, &pixelBuffer)
|
|
374
|
+
guard status == kCVReturnSuccess, let buffer = pixelBuffer else {
|
|
375
|
+
throw RendererError.pixelBufferAllocFailed(status)
|
|
376
|
+
}
|
|
377
|
+
let (texture, wrapper) = try TextureBridge.makeTexture(
|
|
378
|
+
from: buffer,
|
|
379
|
+
cache: textureCache,
|
|
380
|
+
pixelFormat: .bgra8Unorm,
|
|
381
|
+
planeIndex: 0
|
|
382
|
+
)
|
|
383
|
+
return (buffer, texture, wrapper)
|
|
416
384
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
configure: (MTLRenderCommandEncoder) -> Void
|
|
432
|
-
) throws {
|
|
433
|
-
let passDesc = MTLRenderPassDescriptor()
|
|
434
|
-
passDesc.colorAttachments[0].texture = target
|
|
435
|
-
passDesc.colorAttachments[0].loadAction = .dontCare
|
|
436
|
-
passDesc.colorAttachments[0].storeAction = .store
|
|
437
|
-
guard let encoder = commandBuffer.makeRenderCommandEncoder(descriptor: passDesc) else {
|
|
438
|
-
throw RendererError.commandBufferUnavailable
|
|
385
|
+
|
|
386
|
+
private func makeRenderTargetTexture(width: Int, height: Int) throws -> MTLTexture {
|
|
387
|
+
let desc = MTLTextureDescriptor.texture2DDescriptor(
|
|
388
|
+
pixelFormat: .bgra8Unorm,
|
|
389
|
+
width: width,
|
|
390
|
+
height: height,
|
|
391
|
+
mipmapped: false
|
|
392
|
+
)
|
|
393
|
+
desc.usage = [.renderTarget, .shaderRead]
|
|
394
|
+
desc.storageMode = .private
|
|
395
|
+
guard let tex = device.makeTexture(descriptor: desc) else {
|
|
396
|
+
throw RendererError.textureBindFailed("makeTexture (render target) returned nil")
|
|
397
|
+
}
|
|
398
|
+
return tex
|
|
439
399
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
label: label
|
|
474
|
-
) { encoder in
|
|
475
|
-
// spvUnsafeArray<float,5> is 5 tightly packed floats (20 bytes). A Swift
|
|
476
|
-
// [Float] of 5 elements is contiguous with stride 4, so withUnsafeBytes
|
|
477
|
-
// hands setFragmentBytes the exact 20-byte layout the shader expects.
|
|
478
|
-
kernel.weights.withUnsafeBytes { ptr in
|
|
479
|
-
encoder.setFragmentBytes(ptr.baseAddress!, length: ptr.count, index: 0)
|
|
480
|
-
}
|
|
481
|
-
var axisVar = axis
|
|
482
|
-
encoder.setFragmentBytes(&axisVar, length: MemoryLayout<SIMD2<Float>>.stride, index: 5)
|
|
483
|
-
kernel.offsets.withUnsafeBytes { ptr in
|
|
484
|
-
encoder.setFragmentBytes(ptr.baseAddress!, length: ptr.count, index: 6)
|
|
485
|
-
}
|
|
486
|
-
encoder.setFragmentTexture(source, index: 0)
|
|
487
|
-
encoder.setFragmentSamplerState(linearClampSampler, index: 0)
|
|
400
|
+
|
|
401
|
+
// MARK: - Draw helpers
|
|
402
|
+
|
|
403
|
+
/// Encodes a fullscreen-triangle draw into `target` using the given
|
|
404
|
+
/// pipeline. The caller binds fragment buffers/textures/samplers via the
|
|
405
|
+
/// `configure` closure. Loads the attachment as `.dontCare` (we overwrite
|
|
406
|
+
/// every texel) and stores it.
|
|
407
|
+
func drawFullscreen(
|
|
408
|
+
commandBuffer: MTLCommandBuffer,
|
|
409
|
+
pipeline: MTLRenderPipelineState,
|
|
410
|
+
target: MTLTexture,
|
|
411
|
+
label: String,
|
|
412
|
+
configure: (MTLRenderCommandEncoder) -> Void
|
|
413
|
+
) throws {
|
|
414
|
+
let passDesc = MTLRenderPassDescriptor()
|
|
415
|
+
passDesc.colorAttachments[0].texture = target
|
|
416
|
+
passDesc.colorAttachments[0].loadAction = .dontCare
|
|
417
|
+
passDesc.colorAttachments[0].storeAction = .store
|
|
418
|
+
guard let encoder = commandBuffer.makeRenderCommandEncoder(descriptor: passDesc) else {
|
|
419
|
+
throw RendererError.commandBufferUnavailable
|
|
420
|
+
}
|
|
421
|
+
encoder.label = label
|
|
422
|
+
encoder.setRenderPipelineState(pipeline)
|
|
423
|
+
configure(encoder)
|
|
424
|
+
// Fullscreen quad via 4-vertex triangle strip. The passthrough vertex
|
|
425
|
+
// shader (shaders/passthrough.vert) computes both gl_Position and vUv
|
|
426
|
+
// from gl_VertexID alone for IDs 0..3, forming a quad that covers the
|
|
427
|
+
// full NDC viewport. A 3-vertex .triangle call here would draw only
|
|
428
|
+
// half the screen, the triangle ((-1,-1), (1,-1), (-1,1)), with the
|
|
429
|
+
// hypotenuse cutting diagonally across the frame, the SYMPTOM that
|
|
430
|
+
// motivated this fix (half-black with diagonal staircase aliasing).
|
|
431
|
+
encoder.drawPrimitives(type: .triangleStrip, vertexStart: 0, vertexCount: 4)
|
|
432
|
+
encoder.endEncoding()
|
|
488
433
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
target
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
label: String
|
|
508
|
-
) throws {
|
|
509
|
-
try drawFullscreen(
|
|
510
|
-
commandBuffer: commandBuffer,
|
|
511
|
-
pipeline: compositePipeline,
|
|
512
|
-
target: target,
|
|
513
|
-
label: label
|
|
514
|
-
) { encoder in
|
|
515
|
-
var maskUvScaleVar = maskUvScale
|
|
516
|
-
var maskUvOffsetVar = maskUvOffset
|
|
517
|
-
var maskHiVar = maskHi
|
|
518
|
-
var maskLoVar = maskLo
|
|
519
|
-
var bgUvScaleVar = bgUvScale
|
|
520
|
-
var bgUvOffsetVar = bgUvOffset
|
|
521
|
-
encoder.setFragmentBytes(&maskUvScaleVar, length: MemoryLayout<SIMD2<Float>>.stride, index: 0)
|
|
522
|
-
encoder.setFragmentBytes(&maskUvOffsetVar, length: MemoryLayout<SIMD2<Float>>.stride, index: 1)
|
|
523
|
-
encoder.setFragmentBytes(&maskHiVar, length: MemoryLayout<Float>.stride, index: 2)
|
|
524
|
-
encoder.setFragmentBytes(&maskLoVar, length: MemoryLayout<Float>.stride, index: 3)
|
|
525
|
-
encoder.setFragmentBytes(&bgUvScaleVar, length: MemoryLayout<SIMD2<Float>>.stride, index: 4)
|
|
526
|
-
encoder.setFragmentBytes(&bgUvOffsetVar, length: MemoryLayout<SIMD2<Float>>.stride, index: 5)
|
|
527
|
-
encoder.setFragmentTexture(mask, index: 0)
|
|
528
|
-
encoder.setFragmentTexture(original, index: 1)
|
|
529
|
-
encoder.setFragmentTexture(background, index: 2)
|
|
530
|
-
encoder.setFragmentSamplerState(linearClampSampler, index: 0)
|
|
531
|
-
encoder.setFragmentSamplerState(linearClampSampler, index: 1)
|
|
532
|
-
encoder.setFragmentSamplerState(linearClampSampler, index: 2)
|
|
434
|
+
|
|
435
|
+
// MARK: - Generic generative shader
|
|
436
|
+
|
|
437
|
+
/// Build a render pipeline for an arbitrary generative fragment shader, reusing
|
|
438
|
+
/// the shared passthrough vertex (fullscreen quad from gl_VertexID; no vertex
|
|
439
|
+
/// buffer). The owning ShaderProcessor calls this once at first frame with a
|
|
440
|
+
/// ShaderLibrary compiled from `<name>.metalsrc`, so there is NO per-shader
|
|
441
|
+
/// Swift here and adding a generative shader needs no renderer change. The
|
|
442
|
+
/// pipeline renders into a BGRA target like every other pass.
|
|
443
|
+
func makeGenerativePipeline(fragment: MTLFunction, label: String) throws
|
|
444
|
+
-> MTLRenderPipelineState
|
|
445
|
+
{
|
|
446
|
+
try MetalRenderer.makePipeline(
|
|
447
|
+
device: device,
|
|
448
|
+
vertex: passthroughVertex,
|
|
449
|
+
fragment: fragment,
|
|
450
|
+
label: label
|
|
451
|
+
)
|
|
533
452
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
/// camera-buffer reorientation math). For the 90-degree rotations `target` is
|
|
541
|
-
/// dimension-swapped (h x w) relative to `source`.
|
|
542
|
-
func encodeTransform(
|
|
543
|
-
commandBuffer: MTLCommandBuffer,
|
|
544
|
-
source: MTLTexture,
|
|
545
|
-
target: MTLTexture,
|
|
546
|
-
uvTransform: simd_float2x2,
|
|
547
|
-
label: String
|
|
548
|
-
) throws {
|
|
549
|
-
try drawFullscreen(
|
|
550
|
-
commandBuffer: commandBuffer,
|
|
551
|
-
pipeline: transformPipeline,
|
|
552
|
-
target: target,
|
|
553
|
-
label: label
|
|
554
|
-
) { encoder in
|
|
555
|
-
// simd_float2x2 is two contiguous float2 columns (16 bytes), the exact
|
|
556
|
-
// layout MSL's `constant float2x2&` expects at buffer(0).
|
|
557
|
-
var uvTransformVar = uvTransform
|
|
558
|
-
encoder.setFragmentBytes(
|
|
559
|
-
&uvTransformVar,
|
|
560
|
-
length: MemoryLayout<simd_float2x2>.stride,
|
|
561
|
-
index: 0
|
|
562
|
-
)
|
|
563
|
-
encoder.setFragmentTexture(source, index: 0)
|
|
564
|
-
encoder.setFragmentSamplerState(linearClampSampler, index: 0)
|
|
453
|
+
|
|
454
|
+
/// A BGRA, .private render-target texture for a generative shader's background
|
|
455
|
+
/// output. Same shape as the blur ping-pong targets; the ShaderProcessor
|
|
456
|
+
/// caches one per resolution.
|
|
457
|
+
func makeGenerativeTarget(width: Int, height: Int) throws -> MTLTexture {
|
|
458
|
+
try makeRenderTargetTexture(width: width, height: height)
|
|
565
459
|
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
460
|
|
|
569
|
-
///
|
|
570
|
-
///
|
|
571
|
-
///
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
func
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
461
|
+
/// Encode one generative fragment pass into `target`. Binds the host-provided
|
|
462
|
+
/// built-ins (uTime, uResolution) plus every JS-set uniform, each at the Metal
|
|
463
|
+
/// buffer index the shader's MSL decoration assigned it (see
|
|
464
|
+
/// ShaderLibrary.uniformBufferIndices). `scalarUniforms` and `vectorUniforms`
|
|
465
|
+
/// carry (bufferIndex, value) pairs already resolved by name on the host side,
|
|
466
|
+
/// so this method stays NAME-AGNOSTIC: it knows only indices and byte layouts,
|
|
467
|
+
/// never a uniform's meaning. A scalar binds as a single Float (4 bytes); a
|
|
468
|
+
/// 2/3/4-component vector binds as a tightly packed [Float] whose byte count is
|
|
469
|
+
/// the element count * 4; matching MSL's `constant float&` / `float2&` /
|
|
470
|
+
/// `float3&` / `float4&` argument layout (spirv-cross packs float3 as 16 bytes
|
|
471
|
+
/// in a buffer; see the float3 caveat in ShaderProcessor where the host pads).
|
|
472
|
+
func encodeGenerative(
|
|
473
|
+
commandBuffer: MTLCommandBuffer,
|
|
474
|
+
pipeline: MTLRenderPipelineState,
|
|
475
|
+
target: MTLTexture,
|
|
476
|
+
builtinBindings: [(index: Int, value: [Float])],
|
|
477
|
+
uniformBindings: [(index: Int, value: [Float])],
|
|
478
|
+
label: String
|
|
479
|
+
) throws {
|
|
480
|
+
try drawFullscreen(
|
|
481
|
+
commandBuffer: commandBuffer,
|
|
482
|
+
pipeline: pipeline,
|
|
483
|
+
target: target,
|
|
484
|
+
label: label
|
|
485
|
+
) { encoder in
|
|
486
|
+
for binding in builtinBindings {
|
|
487
|
+
binding.value.withUnsafeBytes { ptr in
|
|
488
|
+
encoder.setFragmentBytes(ptr.baseAddress!, length: ptr.count, index: binding.index)
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
for binding in uniformBindings {
|
|
492
|
+
binding.value.withUnsafeBytes { ptr in
|
|
493
|
+
encoder.setFragmentBytes(ptr.baseAddress!, length: ptr.count, index: binding.index)
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
595
497
|
}
|
|
596
|
-
|
|
597
|
-
|
|
498
|
+
|
|
499
|
+
/// Encode the geometric transform pass (`source` -> `target`) for the flip /
|
|
500
|
+
/// rotate effects. transform.metalsrc bindings: buffer(0) uUvTransform
|
|
501
|
+
/// (float2x2), texture(0) uTex, sampler(0) uTexSmplr. The host computes
|
|
502
|
+
/// `uvTransform` via the Orientation helper (the single source of the
|
|
503
|
+
/// camera-buffer reorientation math). For the 90-degree rotations `target` is
|
|
504
|
+
/// dimension-swapped (h x w) relative to `source`.
|
|
505
|
+
func encodeTransform(
|
|
506
|
+
commandBuffer: MTLCommandBuffer,
|
|
507
|
+
source: MTLTexture,
|
|
508
|
+
target: MTLTexture,
|
|
509
|
+
uvTransform: simd_float2x2,
|
|
510
|
+
label: String
|
|
511
|
+
) throws {
|
|
512
|
+
try drawFullscreen(
|
|
513
|
+
commandBuffer: commandBuffer,
|
|
514
|
+
pipeline: transformPipeline,
|
|
515
|
+
target: target,
|
|
516
|
+
label: label
|
|
517
|
+
) { encoder in
|
|
518
|
+
// simd_float2x2 is two contiguous float2 columns (16 bytes), the exact
|
|
519
|
+
// layout MSL's `constant float2x2&` expects at buffer(0).
|
|
520
|
+
var uvTransformVar = uvTransform
|
|
521
|
+
encoder.setFragmentBytes(
|
|
522
|
+
&uvTransformVar,
|
|
523
|
+
length: MemoryLayout<simd_float2x2>.stride,
|
|
524
|
+
index: 0
|
|
525
|
+
)
|
|
526
|
+
encoder.setFragmentTexture(source, index: 0)
|
|
527
|
+
encoder.setFragmentSamplerState(linearClampSampler, index: 0)
|
|
528
|
+
}
|
|
598
529
|
}
|
|
599
|
-
cachedSigma = sigma
|
|
600
|
-
}
|
|
601
530
|
}
|