@tresjs/post-processing 1.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.
Files changed (36) hide show
  1. package/dist/core/pmndrs/BarrelBlurPmndrs.vue.d.ts +26 -0
  2. package/dist/core/pmndrs/{Bloom.vue.d.ts → BloomPmndrs.vue.d.ts} +8 -8
  3. package/dist/core/pmndrs/ChromaticAberrationPmndrs.vue.d.ts +27 -0
  4. package/dist/core/pmndrs/ColorAveragePmndrs.vue.d.ts +16 -0
  5. package/dist/core/pmndrs/{DepthOfField.vue.d.ts → DepthOfFieldPmndrs.vue.d.ts} +3 -3
  6. package/dist/core/pmndrs/DotScreenPmndrs.vue.d.ts +22 -0
  7. package/dist/core/pmndrs/{EffectComposer.vue.d.ts → EffectComposerPmndrs.vue.d.ts} +3 -3
  8. package/dist/core/pmndrs/{Glitch.vue.d.ts → GlitchPmndrs.vue.d.ts} +3 -3
  9. package/dist/core/pmndrs/HueSaturationPmndrs.vue.d.ts +22 -0
  10. package/dist/core/pmndrs/KuwaharaPmndrs.vue.d.ts +27 -0
  11. package/dist/core/pmndrs/LensDistortionPmndrs.vue.d.ts +25 -0
  12. package/dist/core/pmndrs/LinocutPmndrs.vue.d.ts +15 -0
  13. package/dist/core/pmndrs/{Noise.vue.d.ts → NoisePmndrs.vue.d.ts} +3 -4
  14. package/dist/core/pmndrs/{Outline.vue.d.ts → OutlinePmndrs.vue.d.ts} +3 -3
  15. package/dist/core/pmndrs/{Pixelation.vue.d.ts → PixelationPmndrs.vue.d.ts} +3 -3
  16. package/dist/core/pmndrs/ScanlinePmndrs.vue.d.ts +24 -0
  17. package/dist/core/pmndrs/SepiaPmndrs.vue.d.ts +16 -0
  18. package/dist/core/pmndrs/ShockWavePmndrs.vue.d.ts +29 -0
  19. package/dist/core/pmndrs/TiltShiftPmndrs.vue.d.ts +49 -0
  20. package/dist/core/pmndrs/ToneMappingPmndrs.vue.d.ts +36 -0
  21. package/dist/core/pmndrs/{Vignette.vue.d.ts → VignettePmndrs.vue.d.ts} +6 -11
  22. package/dist/core/pmndrs/composables/{useEffect.d.ts → useEffectPmndrs.d.ts} +1 -1
  23. package/dist/core/pmndrs/custom/barrel-blur/index.d.ts +36 -0
  24. package/dist/core/pmndrs/custom/kuwahara/index.d.ts +31 -0
  25. package/dist/core/pmndrs/custom/linocut/index.d.ts +27 -0
  26. package/dist/core/pmndrs/index.d.ts +23 -10
  27. package/dist/core/three/UnrealBloom.vue.d.ts +1 -1
  28. package/dist/index.d.ts +2 -0
  29. package/dist/tres-post-processing.d.ts +2 -0
  30. package/dist/{three.js → tres-post-processing.js} +1324 -258
  31. package/dist/tres-post-processing.umd.cjs +1209 -0
  32. package/package.json +24 -27
  33. package/dist/pmndrs.d.ts +0 -2
  34. package/dist/pmndrs.js +0 -352
  35. package/dist/prop-BjrXLDuj.js +0 -43
  36. package/dist/three.d.ts +0 -2
@@ -0,0 +1,1209 @@
1
+ /**
2
+ * name: @tresjs/post-processing
3
+ * version: v2.1.0
4
+ * (c) 2025
5
+ * description: Post-processing library for TresJS
6
+ * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
7
+ */
8
+ (function(u,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("postprocessing"),require("@tresjs/core"),require("three"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","postprocessing","@tresjs/core","three","@vueuse/core"],n):(u=typeof globalThis<"u"?globalThis:u||self,n(u["tres-post-processing"]={},u.Vue,u.Postprocessing,u.TresjsCore,u.Three,u.VueUseCore))})(this,function(u,n,f,g,s,F){"use strict";const z=/([^[.\]])+/g,J=(r,e)=>{if(!e)return;const t=Array.isArray(e)?e:e.match(z);return t==null?void 0:t.reduce((o,a)=>o&&o[a],r)},U=(r,e,t)=>{const o=Array.isArray(e)?e:e.match(z);o&&o.reduce((a,i,l)=>(a[i]===void 0&&(a[i]={}),l===o.length-1&&(a[i]=t),a[i]),r)},O=(r,e)=>{const t={...r};return e.forEach(o=>delete t[o]),t},B=(r,e,t,o,a={})=>n.watch(r,i=>{var l;if(e.value)if(i===void 0){const c=o();U(e.value,t,J(c,t)),(l=c.dispose)==null||l.call(c)}else U(e.value,t,r())},a),b=(r,e,t)=>r.map(([o,a])=>B(o,e,a,t)),C=(r,e,t)=>Object.keys(r).map(o=>B(()=>r[o],e,o,t));class W{static isWebGL2Available(){try{const e=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&e.getContext("webgl2"))}catch{return!1}}static isColorSpaceAvailable(e){try{const t=document.createElement("canvas"),o=window.WebGL2RenderingContext&&t.getContext("webgl2");return o.drawingBufferColorSpace=e,o.drawingBufferColorSpace===e}catch{return!1}}static getWebGL2ErrorMessage(){return this.getErrorMessage(2)}static getErrorMessage(e){const t={1:"WebGL",2:"WebGL 2"},o={1:window.WebGLRenderingContext,2:window.WebGL2RenderingContext};let a='Your $0 does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">$1</a>';const i=document.createElement("div");return i.id="webglmessage",i.style.fontFamily="monospace",i.style.fontSize="13px",i.style.fontWeight="normal",i.style.textAlign="center",i.style.background="#fff",i.style.color="#000",i.style.padding="1.5em",i.style.width="400px",i.style.margin="5em auto 0",o[e]?a=a.replace("$0","graphics card"):a=a.replace("$0","browser"),a=a.replace("$1",t[e]),i.innerHTML=a,i}static isWebGLAvailable(){console.warn("isWebGLAvailable() has been deprecated and will be removed in r178. Use isWebGL2Available() instead.");try{const e=document.createElement("canvas");return!!(window.WebGLRenderingContext&&(e.getContext("webgl")||e.getContext("experimental-webgl")))}catch{return!1}}static getWebGLErrorMessage(){return console.warn("getWebGLErrorMessage() has been deprecated and will be removed in r178. Use getWebGL2ErrorMessage() instead."),this.getErrorMessage(1)}}const H=Symbol("effectComposerPmndrs"),Z=n.defineComponent({__name:"EffectComposerPmndrs",props:{enabled:{type:Boolean,default:!0},depthBuffer:{type:Boolean,default:void 0},disableNormalPass:{type:Boolean,default:!1},stencilBuffer:{type:Boolean,default:void 0},resolutionScale:{},autoClear:{type:Boolean,default:!0},multisampling:{default:0},frameBufferType:{default:s.HalfFloatType}},emits:["render"],setup(r,{expose:e,emit:t}){const o=r,a=t,{scene:i,camera:l,renderer:c,sizes:d,render:S}=g.useTresContext(),h=n.shallowRef(null);let v=null,m=null;n.provide(H,h),e({composer:h});const A=()=>{h.value&&(m=new f.NormalPass(i.value,l.value),m.enabled=!1,h.value.addPass(m),o.resolutionScale!==void 0&&W.isWebGL2Available()&&(v=new f.DepthDownsamplingPass({normalBuffer:m.texture,resolutionScale:o.resolutionScale}),v.enabled=!1,h.value.addPass(v)))},R=n.computed(()=>{const x=new f.EffectComposer,E={depthBuffer:o.depthBuffer!==void 0?o.depthBuffer:x.inputBuffer.depthBuffer,stencilBuffer:o.stencilBuffer!==void 0?o.stencilBuffer:x.inputBuffer.stencilBuffer,multisampling:W.isWebGL2Available()?o.multisampling!==void 0?o.multisampling:x.multisampling:0,frameBufferType:o.frameBufferType!==void 0?o.frameBufferType:s.HalfFloatType};return x.dispose(),E}),K=()=>{var x;!c.value&&!i.value&&!l.value||((x=h.value)==null||x.dispose(),h.value=new f.EffectComposer(c.value,R.value),h.value.addPass(new f.RenderPass(i.value,l.value)),o.disableNormalPass||A())};n.watch([c,i,l,()=>o.disableNormalPass],()=>{!d.width.value||!d.height.value||K()}),n.watch(()=>[d.width.value,d.height.value],([x,E])=>{!x&&!E||(h.value?h.value.setSize(x,E):K())},{immediate:!0});const{render:We}=g.useLoop();return We(()=>{if(o.enabled&&c.value&&h.value&&d.width.value&&d.height.value&&S.frames.value>0){const x=c.value.autoClear;c.value.autoClear=o.autoClear,o.stencilBuffer&&!o.autoClear&&c.value.clearStencil(),h.value.render(),a("render",h.value),c.value.autoClear=x}S.frames.value=S.mode.value==="always"?1:Math.max(0,S.frames.value-1)}),n.onUnmounted(()=>{var x;(x=h.value)==null||x.dispose()}),(x,E)=>n.renderSlot(x.$slots,"default")}}),p=(r,e)=>{const t=n.inject(H),o=n.shallowRef(null),a=n.shallowRef(null),{scene:i,camera:l,invalidate:c}=g.useTresContext();e&&n.watch(e,()=>c()),n.watchEffect(()=>{!l.value||!(a!=null&&a.value)||(a.value.mainCamera=l.value)});const d=n.watchEffect(()=>{!l.value||!(t!=null&&t.value)||!i.value||(n.nextTick(()=>d()),!a.value&&(a.value=r(),o.value=new f.EffectPass(l.value,a.value),t.value.addPass(o.value)))});return n.onUnmounted(()=>{var S,h,v;o.value&&((S=t==null?void 0:t.value)==null||S.removePass(o.value)),(h=a.value)==null||h.dispose(),(v=o.value)==null||v.dispose()}),{pass:o,effect:a}},_=n.defineComponent({__name:"BloomPmndrs",props:{blendFunction:{},intensity:{},kernelSize:{},luminanceThreshold:{},luminanceSmoothing:{},mipmapBlur:{type:Boolean,default:void 0}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.BloomEffect(t),t);return e({pass:o,effect:a}),b([[()=>t.intensity,"intensity"],[()=>t.kernelSize,"kernelSize"],[()=>t.luminanceSmoothing,"luminanceMaterial.smoothing"],[()=>t.luminanceThreshold,"luminanceMaterial.threshold"]],a,()=>new f.BloomEffect),()=>{}}}),$=n.defineComponent({__name:"DepthOfFieldPmndrs",props:{blendFunction:{},worldFocusDistance:{},worldFocusRange:{},focusDistance:{},focusRange:{},bokehScale:{},resolutionScale:{},resolutionX:{},resolutionY:{}},setup(r,{expose:e}){const t=r,{camera:o}=g.useTresContext(),{pass:a,effect:i}=p(()=>new f.DepthOfFieldEffect(o.value,t),t);return e({pass:a,effect:i}),b([[()=>t.worldFocusDistance,"circleOfConfusionMaterial.worldFocusDistance"],[()=>t.focusDistance,"circleOfConfusionMaterial.focusDistance"],[()=>t.worldFocusRange,"circleOfConfusionMaterial.worldFocusRange"],[()=>t.focusRange,"circleOfConfusionMaterial.focusRange"],[()=>t.bokehScale,"bokehScale"],[()=>t.resolutionScale,"blurPass.resolution.scale"],[()=>t.resolutionX,"resolution.width"],[()=>t.resolutionY,"resolution.height"]],i,()=>new f.DepthOfFieldEffect),()=>{}}}),ee=n.defineComponent({__name:"GlitchPmndrs",props:{blendFunction:{},delay:{},duration:{},strength:{},mode:{},active:{type:Boolean},ratio:{},columns:{},chromaticAberrationOffset:{},perturbationMap:{},dtSize:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.GlitchEffect(t),t);e({pass:o,effect:a});const{onBeforeRender:i}=g.useLoop();return i(({invalidate:l})=>l()),n.watchEffect(()=>{const l=()=>{if(t.mode!==void 0)return t.active===!1?f.GlitchMode.DISABLED:t.mode;const c=new f.GlitchEffect,d=c.mode;return c.dispose(),d};a.value&&(a.value.mode=l())}),C(O(t,["active","mode","blendFunction"]),a,()=>new f.GlitchEffect),()=>{}}}),te=n.defineComponent({__name:"NoisePmndrs",props:{premultiply:{type:Boolean,default:void 0},blendFunction:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.NoiseEffect(t),t);e({pass:o,effect:a});const{onBeforeRender:i}=g.useLoop();return i(({invalidate:l})=>l()),C(O(t,["blendFunction"]),a,()=>new f.NoiseEffect),()=>{}}}),oe=n.defineComponent({__name:"OutlinePmndrs",props:{outlinedObjects:{},blur:{type:Boolean,default:void 0},xRay:{type:Boolean,default:void 0},kernelSize:{},pulseSpeed:{},resolutionX:{},resolutionY:{},edgeStrength:{},patternScale:{},multisampling:{},blendFunction:{},patternTexture:{},resolutionScale:{},hiddenEdgeColor:{},visibleEdgeColor:{}},setup(r,{expose:e}){const t=r,o=h=>h!==void 0?g.normalizeColor(h).getHex():void 0,{camera:a,scene:i}=g.useTresContext(),l={blur:t.blur,xRay:t.xRay,kernelSize:t.kernelSize,pulseSpeed:t.pulseSpeed,resolutionX:t.resolutionX,resolutionY:t.resolutionY,patternScale:t.patternScale,edgeStrength:t.edgeStrength,blendFunction:t.blendFunction,multisampling:t.multisampling,patternTexture:t.patternTexture,resolutionScale:t.resolutionScale,hiddenEdgeColor:o(t.hiddenEdgeColor),visibleEdgeColor:o(t.visibleEdgeColor)},{pass:c,effect:d}=p(()=>new f.OutlineEffect(i.value,a.value,l),t);e({pass:c,effect:d}),n.watch([()=>t.outlinedObjects,d],()=>{var h;(h=d.value)==null||h.selection.set(t.outlinedObjects||[])},{immediate:!0});const S=n.computed(()=>({hiddenEdgeColor:t.hiddenEdgeColor?g.normalizeColor(t.hiddenEdgeColor):void 0,visibleEdgeColor:t.visibleEdgeColor?g.normalizeColor(t.visibleEdgeColor):void 0}));return b([[()=>t.blur,"blur"],[()=>t.xRay,"xRay"],[()=>t.pulseSpeed,"pulseSpeed"],[()=>t.kernelSize,"kernelSize"],[()=>t.edgeStrength,"edgeStrength"],[()=>t.patternScale,"patternScale"],[()=>t.multisampling,"multisampling"],[()=>S.value.hiddenEdgeColor,"hiddenEdgeColor"],[()=>S.value.visibleEdgeColor,"visibleEdgeColor"]],d,()=>new f.OutlineEffect),()=>{}}}),ae=n.defineComponent({__name:"PixelationPmndrs",props:{granularity:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.PixelationEffect(t.granularity),t);return e({pass:o,effect:a}),C(t,a,()=>new f.PixelationEffect),()=>{}}}),ie=n.defineComponent({__name:"VignettePmndrs",props:{technique:{},blendFunction:{},offset:{},darkness:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.VignetteEffect(t),t);return e({pass:o,effect:a}),C(O(t,["blendFunction"]),a,()=>new f.VignetteEffect),()=>{}}});class G extends f.Effect{constructor({blendFunction:e=f.BlendFunction.NORMAL,amount:t=.15,offset:o=new s.Vector2(.5,.5)}={}){super("BarrelBlurEffect",`
9
+ uniform float amount;
10
+ uniform vec2 offset;
11
+
12
+ #define NUM_ITER 16
13
+ #define RECIP_NUM_ITER 0.0625
14
+ #define GAMMA 1.0
15
+
16
+ vec3 spectrum_offset(float t) {
17
+ float lo = step(t, 0.5);
18
+ float hi = 1.0 - lo;
19
+ float w = 1.0 - abs(2.0 * t - 1.0);
20
+ return pow(vec3(lo, 1.0, hi) * vec3(1.0 - w, w, 1.0 - w), vec3(1.0 / GAMMA));
21
+ }
22
+
23
+ vec2 barrelDistortion(vec2 p, float amt) {
24
+ p = p - offset;
25
+ float theta = atan(p.y, p.x);
26
+ float radius = pow(length(p), 1.0 + 3.0 * amt);
27
+ return vec2(cos(theta), sin(theta)) * radius + offset;
28
+ }
29
+
30
+ void mainUv(inout vec2 uv) {
31
+ uv = barrelDistortion(uv, amount * 0.5);
32
+ }
33
+
34
+ void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
35
+ vec3 sumcol = vec3(0.0);
36
+ vec3 sumw = vec3(0.0);
37
+
38
+ for (int i = 0; i < NUM_ITER; ++i) {
39
+ float t = float(i) * RECIP_NUM_ITER;
40
+ vec3 w = spectrum_offset(t);
41
+ vec2 distortedUV = barrelDistortion(uv, amount * t);
42
+ sumcol += w * texture(inputBuffer, distortedUV).rgb;
43
+ sumw += w;
44
+ }
45
+
46
+ vec3 outcol = pow(sumcol / sumw, vec3(1.0 / GAMMA));
47
+
48
+ outcol = clamp(outcol, 0.0, 1.0); // Ensures normalized color values
49
+
50
+ outputColor = vec4(outcol, inputColor.a); // Preserves original alpha
51
+ }
52
+ `,{blendFunction:e,uniforms:new Map([["amount",new s.Uniform(t)],["offset",new s.Uniform(o)]])})}get amount(){var e;return(e=this.uniforms.get("amount"))==null?void 0:e.value}set amount(e){this.uniforms.get("amount").value=e}get offset(){var e;return(e=this.uniforms.get("offset"))==null?void 0:e.value}set offset(e){this.uniforms.get("offset").value=e}}const se=n.defineComponent({__name:"BarrelBlurPmndrs",props:{blendFunction:{},amount:{},offset:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new G({...t,offset:Array.isArray(t.offset)?new s.Vector2(...t.offset):t.offset}),t);return e({pass:o,effect:a}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.amount,"amount"],[()=>t.offset,"offset"]],a,()=>new G),()=>{}}}),re=n.defineComponent({__name:"ToneMappingPmndrs",props:{mode:{},blendFunction:{},resolution:{},averageLuminance:{},middleGrey:{},minLuminance:{},whitePoint:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.ToneMappingEffect(t),t);return e({pass:o,effect:a}),b([[()=>t.mode,"mode"],[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.resolution,"resolution"],[()=>t.averageLuminance,"averageLuminance"],[()=>t.middleGrey,"middleGrey"],[()=>t.minLuminance,"adaptiveLuminanceMaterial.minLuminance"],[()=>t.whitePoint,"whitePoint"]],a,()=>new f.ToneMappingEffect),()=>{}}}),ne=n.defineComponent({__name:"ChromaticAberrationPmndrs",props:{blendFunction:{},offset:{},radialModulation:{type:Boolean,default:void 0},modulationOffset:{}},setup(r,{expose:e}){const t=r,o=new f.ChromaticAberrationEffect,{pass:a,effect:i}=p(()=>new f.ChromaticAberrationEffect({...t,radialModulation:t.radialModulation??o.radialModulation,modulationOffset:t.modulationOffset??o.modulationOffset}),t);return o.dispose(),e({pass:a,effect:i}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.offset,"offset"],[()=>t.radialModulation,"radialModulation"],[()=>t.modulationOffset,"modulationOffset"]],i,()=>new f.ChromaticAberrationEffect),()=>{}}}),le=n.defineComponent({__name:"HueSaturationPmndrs",props:{saturation:{},hue:{},blendFunction:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.HueSaturationEffect(t),t);return e({pass:o,effect:a}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.hue,"hue"],[()=>t.saturation,"saturation"]],a,()=>new f.HueSaturationEffect),()=>{}}}),ce=n.defineComponent({__name:"ScanlinePmndrs",props:{blendFunction:{},density:{},scrollSpeed:{},opacity:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.ScanlineEffect(t),t);return e({pass:o,effect:a}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.density,"density"],[()=>t.scrollSpeed,"scrollSpeed"]],a,()=>new f.ScanlineEffect),n.watch([()=>t.opacity],()=>{var i,l;if(t.opacity!==void 0)(i=a.value)==null||i.blendMode.setOpacity(t.opacity);else{const c=new f.ScanlineEffect;(l=a.value)==null||l.blendMode.setOpacity(c.blendMode.getOpacity()),c.dispose()}},{immediate:!0}),()=>{}}}),fe=`
53
+ uniform float radius;
54
+ uniform int sectorCount;
55
+
56
+ const int MAX_SECTOR_COUNT = 8;
57
+
58
+ float polynomialWeight(float x, float y, float eta, float lambda) {
59
+ float polyValue = (x + eta) - lambda * (y * y);
60
+ return max(0.0, polyValue * polyValue);
61
+ }
62
+
63
+ void getSectorVarianceAndAverageColor(mat2 anisotropyMat, float angle, float radius, out vec3 avgColor, out float variance) {
64
+ vec3 weightedColorSum = vec3(0.0);
65
+ vec3 weightedSquaredColorSum = vec3(0.0);
66
+ float totalWeight = 0.0;
67
+
68
+ float eta = 0.1;
69
+ float lambda = 0.5;
70
+ float angleStep = 0.196349; // Precompute angle step
71
+ float halfAngleRange = 0.392699; // Precompute half angle range
72
+
73
+ float cosAngle = cos(angle);
74
+ float sinAngle = sin(angle);
75
+
76
+ for (float r = 1.0; r <= radius; r += 1.0) {
77
+ float rCosAngle = r * cosAngle;
78
+ float rSinAngle = r * sinAngle;
79
+ for (float a = -halfAngleRange; a <= halfAngleRange; a += angleStep) {
80
+ float cosA = cos(a);
81
+ float sinA = sin(a);
82
+ vec2 sampleOffset = vec2(rCosAngle * cosA - rSinAngle * sinA, rCosAngle * sinA + rSinAngle * cosA) / resolution;
83
+ sampleOffset *= anisotropyMat;
84
+
85
+ vec3 color = texture2D(inputBuffer, vUv + sampleOffset).rgb;
86
+ float weight = polynomialWeight(sampleOffset.x, sampleOffset.y, eta, lambda);
87
+
88
+ weightedColorSum += color * weight;
89
+ weightedSquaredColorSum += color * color * weight;
90
+ totalWeight += weight;
91
+ }
92
+ }
93
+
94
+ // Calculate average color and variance
95
+ avgColor = weightedColorSum / totalWeight;
96
+ vec3 varianceRes = (weightedSquaredColorSum / totalWeight) - (avgColor * avgColor);
97
+ variance = dot(varianceRes, vec3(0.299, 0.587, 0.114)); // Convert to luminance
98
+ }
99
+
100
+ vec4 getDominantOrientation(vec4 structureTensor) {
101
+ float Jxx = structureTensor.r;
102
+ float Jyy = structureTensor.g;
103
+ float Jxy = structureTensor.b;
104
+
105
+ float trace = Jxx + Jyy;
106
+ float det = Jxx * Jyy - Jxy * Jxy;
107
+ float lambda1 = 0.5 * (trace + sqrt(trace * trace - 4.0 * det));
108
+ float lambda2 = 0.5 * (trace - sqrt(trace * trace - 4.0 * det));
109
+
110
+ float dominantOrientation = atan(2.0 * Jxy, Jxx - Jyy) / 2.0;
111
+ return vec4(dominantOrientation, lambda1, lambda2, 0.0);
112
+ }
113
+
114
+ void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
115
+ vec4 structureTensor = texture2D(inputBuffer, uv);
116
+
117
+ vec3 sectorAvgColors[MAX_SECTOR_COUNT];
118
+ float sectorVariances[MAX_SECTOR_COUNT];
119
+
120
+ vec4 orientationAndAnisotropy = getDominantOrientation(structureTensor);
121
+ vec2 orientation = orientationAndAnisotropy.xy;
122
+
123
+ float anisotropy = (orientationAndAnisotropy.z - orientationAndAnisotropy.w) / (orientationAndAnisotropy.z + orientationAndAnisotropy.w + 1e-7);
124
+
125
+ float alpha = 25.0;
126
+ float scaleX = alpha / (anisotropy + alpha);
127
+ float scaleY = (anisotropy + alpha) / alpha;
128
+
129
+ mat2 anisotropyMat = mat2(orientation.x, -orientation.y, orientation.y, orientation.x) * mat2(scaleX, 0.0, 0.0, scaleY);
130
+
131
+ for (int i = 0; i < sectorCount; i++) {
132
+ float angle = float(i) * 6.28318 / float(sectorCount); // 2π / sectorCount
133
+ getSectorVarianceAndAverageColor(anisotropyMat, angle, float(radius), sectorAvgColors[i], sectorVariances[i]);
134
+ }
135
+
136
+ float minVariance = sectorVariances[0];
137
+ vec3 finalColor = sectorAvgColors[0];
138
+
139
+ for (int i = 1; i < sectorCount; i++) {
140
+ if (sectorVariances[i] < minVariance) {
141
+ minVariance = sectorVariances[i];
142
+ finalColor = sectorAvgColors[i];
143
+ }
144
+ }
145
+
146
+ outputColor = vec4(finalColor, inputColor.a);
147
+ }
148
+ `;class V extends f.Effect{constructor({blendFunction:e=f.BlendFunction.NORMAL,radius:t=1,sectorCount:o=4}={}){super("KuwaharaEffect",fe,{blendFunction:e,uniforms:new Map([["radius",new s.Uniform(t)],["sectorCount",new s.Uniform(o)]])})}get radius(){var e;return(e=this.uniforms.get("radius"))==null?void 0:e.value}set radius(e){this.uniforms.get("radius").value=e}get sectorCount(){var e;return(e=this.uniforms.get("sectorCount"))==null?void 0:e.value}set sectorCount(e){this.uniforms.get("sectorCount").value=e}}const ue=n.defineComponent({__name:"KuwaharaPmndrs",props:{blendFunction:{},radius:{},sectorCount:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new V(t),t);return e({pass:o,effect:a}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.radius,"radius"],[()=>t.sectorCount,"sectorCount"]],a,()=>new V),()=>{}}}),de=n.defineComponent({__name:"ColorAveragePmndrs",props:{blendFunction:{},opacity:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.ColorAverageEffect(t.blendFunction),t);return e({pass:o,effect:a}),B(()=>t.blendFunction,a,"blendMode.blendFunction",()=>new f.ColorAverageEffect),n.watch([a,()=>t.opacity],()=>{var i,l;if(a.value)if(t.opacity!==void 0)(i=a.value)==null||i.blendMode.setOpacity(t.opacity);else{const c=new f.ColorAverageEffect;(l=a.value)==null||l.blendMode.setOpacity(c.blendMode.getOpacity()),c.dispose()}}),()=>{}}}),he=n.defineComponent({__name:"LensDistortionPmndrs",props:{distortion:{},principalPoint:{},focalLength:{},skew:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.LensDistortionEffect({...t,distortion:t.distortion?Array.isArray(t.distortion)?new s.Vector2(...t.distortion):t.distortion:new s.Vector2,principalPoint:t.principalPoint?Array.isArray(t.principalPoint)?new s.Vector2(...t.principalPoint):t.principalPoint:new s.Vector2,focalLength:t.focalLength?Array.isArray(t.focalLength)?new s.Vector2(...t.focalLength):t.focalLength:new s.Vector2}),t);return e({pass:o,effect:a}),C(t,a,()=>new f.LensDistortionEffect),()=>{}}}),me=n.defineComponent({__name:"ShockWavePmndrs",props:{position:{},amplitude:{},speed:{},maxRadius:{},waveSize:{}},setup(r,{expose:e}){const t=r,{camera:o}=g.useTresContext(),{pass:a,effect:i}=p(()=>new f.ShockWaveEffect(o.value,Array.isArray(t.position)?new s.Vector3(...t.position):t.position,t),t);return e({pass:a,effect:i}),n.watch(()=>t.position,l=>{i.value&&(Array.isArray(l)?i.value.position.set(...l):l instanceof s.Vector3&&i.value.position.copy(l))},{immediate:!0}),b([[()=>t.amplitude,"amplitude"],[()=>t.waveSize,"waveSize"],[()=>t.maxRadius,"maxRadius"],[()=>t.speed,"speed"]],i,()=>new f.ShockWaveEffect),()=>{}}}),pe=n.defineComponent({__name:"TiltShiftPmndrs",props:{blendFunction:{},offset:{},rotation:{},focusArea:{},feather:{},kernelSize:{},resolutionScale:{},resolutionX:{},resolutionY:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.TiltShiftEffect(t),t);return e({pass:o,effect:a}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.offset,"offset"],[()=>t.rotation,"rotation"],[()=>t.focusArea,"focusArea"],[()=>t.feather,"feather"],[()=>t.kernelSize,"kernelSize"],[()=>t.resolutionScale,"resolution.scale"],[()=>t.resolutionX,"resolution.width"],[()=>t.resolutionY,"resolution.height"]],a,()=>new f.TiltShiftEffect),()=>{}}}),ge=n.defineComponent({__name:"DotScreenPmndrs",props:{angle:{},scale:{},blendFunction:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.DotScreenEffect(t),t);return e({pass:o,effect:a}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.angle,"angle"],[()=>t.scale,"scale"]],a,()=>new f.DotScreenEffect),()=>{}}}),ve=n.defineComponent({__name:"SepiaPmndrs",props:{blendFunction:{},intensity:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new f.SepiaEffect(t),t);return e({pass:o,effect:a}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.intensity,"intensity"]],a,()=>new f.SepiaEffect),()=>{}}});class X extends f.Effect{constructor({blendFunction:e=f.BlendFunction.NORMAL,scale:t=.85,noiseScale:o=0,center:a=[.5,.5],rotation:i=0}={}){const l=Array.isArray(a)?new s.Vector2().fromArray(a):a;super("LinocutEffect",`
149
+ uniform float scale;
150
+ uniform float noiseScale;
151
+ uniform vec2 center;
152
+ uniform float rotation;
153
+
154
+ float luma(vec3 color) {
155
+ return dot(color, vec3(0.299, 0.587, 0.114));
156
+ }
157
+
158
+ float luma(vec4 color) {
159
+ return dot(color.rgb, vec3(0.299, 0.587, 0.114));
160
+ }
161
+
162
+ // Simple pseudo-random noise function
163
+ float noise(vec2 p) {
164
+ return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453123);
165
+ }
166
+
167
+ void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
168
+ // Calculate the center based on center
169
+ vec2 fragCoord = uv * resolution.xy;
170
+
171
+ // Apply rotation to the coordinates
172
+ vec2 d = fragCoord - center * resolution.xy;
173
+ mat2 rotMat = mat2(cos(rotation), -sin(rotation), sin(rotation), cos(rotation));
174
+ vec2 rotatedD = d * rotMat;
175
+
176
+ // Calculate radial distance and angle
177
+ float r = length(rotatedD) / (1000.0 / max(scale, 0.01)); // Normalization to avoid artifacts
178
+ float a = atan(rotatedD.y, rotatedD.x) + scale * (0.5 - r) / 0.5;
179
+
180
+ // Calculate transformed coordinates
181
+ vec2 uvt = center * resolution.xy + r * vec2(cos(a), sin(a));
182
+
183
+ // Normalize UV coordinates
184
+ vec2 uv2 = fragCoord / resolution.xy;
185
+
186
+ // Generate sinusoidal line patterns
187
+ float c = (0.75 + 0.25 * sin(uvt.x * 1000.0 * max(scale, 0.01))); // Prevent excessive distortions
188
+
189
+ // Load the texture and convert to grayscale
190
+ vec4 color = texture(inputBuffer, uv2);
191
+ color.rgb = color.rgb * color.rgb; // Convert from sRGB to linear
192
+ float l = luma(color);
193
+
194
+ // Add noise based on noiseScale
195
+ float n = noise(uv2 * 10.0); // Generate noise
196
+ l += noiseScale * (n - 0.5); // Apply noise as a perturbation
197
+
198
+ // Apply smoothing to achieve the linocut effect
199
+ float f = smoothstep(0.5 * c, c, l);
200
+ f = smoothstep(0.0, 0.5, f);
201
+
202
+ // Convert the final value back to sRGB
203
+ f = sqrt(f);
204
+
205
+ // Output the final color in black and white
206
+ outputColor = vec4(vec3(f), 1.0);
207
+ }
208
+ `,{blendFunction:e,uniforms:new Map([["scale",new s.Uniform(t)],["noiseScale",new s.Uniform(o)],["center",new s.Uniform(l)],["rotation",new s.Uniform(i)]])})}get scale(){var e;return(e=this.uniforms.get("scale"))==null?void 0:e.value}set scale(e){this.uniforms.get("scale").value=e}get noiseScale(){var e;return(e=this.uniforms.get("noiseScale"))==null?void 0:e.value}set noiseScale(e){this.uniforms.get("noiseScale").value=e}get center(){var e;return(e=this.uniforms.get("center"))==null?void 0:e.value}set center(e){this.uniforms.get("center").value=Array.isArray(e)?new s.Vector2().fromArray(e):e}get rotation(){var e;return(e=this.uniforms.get("rotation"))==null?void 0:e.value}set rotation(e){this.uniforms.get("rotation").value=e}}const xe=n.defineComponent({__name:"LinocutPmndrs",props:{blendFunction:{},scale:{},noiseScale:{},center:{},rotation:{}},setup(r,{expose:e}){const t=r,{pass:o,effect:a}=p(()=>new X({...t,center:t.center instanceof s.Vector2?[t.center.x,t.center.y]:t.center}),t);return e({pass:o,effect:a}),b([[()=>t.blendFunction,"blendMode.blendFunction"],[()=>t.scale,"scale"],[()=>t.noiseScale,"noiseScale"],[()=>t.center,"center"],[()=>t.rotation,"rotation"]],a,()=>new X),()=>{}}}),I={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:`
209
+
210
+ varying vec2 vUv;
211
+
212
+ void main() {
213
+
214
+ vUv = uv;
215
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
216
+
217
+ }`,fragmentShader:`
218
+
219
+ uniform float opacity;
220
+
221
+ uniform sampler2D tDiffuse;
222
+
223
+ varying vec2 vUv;
224
+
225
+ void main() {
226
+
227
+ vec4 texel = texture2D( tDiffuse, vUv );
228
+ gl_FragColor = opacity * texel;
229
+
230
+
231
+ }`};class w{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const be=new s.OrthographicCamera(-1,1,1,-1,0,1);class Se extends s.BufferGeometry{constructor(){super(),this.setAttribute("position",new s.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new s.Float32BufferAttribute([0,2,0,0,2,0],2))}}const we=new Se;class T{constructor(e){this._mesh=new s.Mesh(we,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,be)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class Ae extends w{constructor(e,t){super(),this.textureID=t!==void 0?t:"tDiffuse",e instanceof s.ShaderMaterial?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=s.UniformsUtils.clone(e.uniforms),this.material=new s.ShaderMaterial({name:e.name!==void 0?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new T(this.material)}render(e,t,o){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=o.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class j extends w{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,o){const a=e.getContext(),i=e.state;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0);let l,c;this.inverse?(l=0,c=1):(l=1,c=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),i.buffers.stencil.setFunc(a.ALWAYS,l,4294967295),i.buffers.stencil.setClear(c),i.buffers.stencil.setLocked(!0),e.setRenderTarget(o),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.color.setMask(!0),i.buffers.depth.setMask(!0),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(a.EQUAL,1,4294967295),i.buffers.stencil.setOp(a.KEEP,a.KEEP,a.KEEP),i.buffers.stencil.setLocked(!0)}}class Te extends w{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class Me{constructor(e,t){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),t===void 0){const o=e.getSize(new s.Vector2);this._width=o.width,this._height=o.height,t=new s.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:s.HalfFloatType}),t.texture.name="EffectComposer.rt1"}else this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new Ae(I),this.copyPass.material.blending=s.NoBlending,this.clock=new s.Clock}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);t!==-1&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){e===void 0&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let o=!1;for(let a=0,i=this.passes.length;a<i;a++){const l=this.passes[a];if(l.enabled!==!1){if(l.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(a),l.render(this.renderer,this.writeBuffer,this.readBuffer,e,o),l.needsSwap){if(o){const c=this.renderer.getContext(),d=this.renderer.state.buffers.stencil;d.setFunc(c.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),d.setFunc(c.EQUAL,1,4294967295)}this.swapBuffers()}j!==void 0&&(l instanceof j?o=!0:l instanceof Te&&(o=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(e===void 0){const t=this.renderer.getSize(new s.Vector2);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,e=this.renderTarget1.clone(),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const o=this._width*this._pixelRatio,a=this._height*this._pixelRatio;this.renderTarget1.setSize(o,a),this.renderTarget2.setSize(o,a);for(let i=0;i<this.passes.length;i++)this.passes[i].setSize(o,a)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class ye extends w{constructor(e,t,o=null,a=null,i=null){super(),this.scene=e,this.camera=t,this.overrideMaterial=o,this.clearColor=a,this.clearAlpha=i,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new s.Color}render(e,t,o){const a=e.autoClear;e.autoClear=!1;let i,l;this.overrideMaterial!==null&&(l=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(e.getClearColor(this._oldClearColor),e.setClearColor(this.clearColor,e.getClearAlpha())),this.clearAlpha!==null&&(i=e.getClearAlpha(),e.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:o),this.clear===!0&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor!==null&&e.setClearColor(this._oldClearColor),this.clearAlpha!==null&&e.setClearAlpha(i),this.overrideMaterial!==null&&(this.scene.overrideMaterial=l),e.autoClear=a}}const Y=Symbol("effectComposerThree"),Ce=n.defineComponent({__name:"EffectComposer",props:{enabled:{type:Boolean,default:!0},withoutRenderPass:{type:Boolean}},setup(r,{expose:e}){const t=r,o=n.shallowRef(null);n.provide(Y,o),e({composer:o});const{renderer:a,sizes:i,scene:l,camera:c,render:d}=g.useTresContext(),S=()=>{var m;(m=o.value)==null||m.dispose(),o.value=new Me(a.value)};n.watchEffect(S),n.watchEffect(()=>{var R;const{width:m,height:A}=i;A.value&&m.value&&((R=o.value)==null||R.setSize(m.value,A.value))});const{pixelRatio:h}=F.useDevicePixelRatio();n.watchEffect(()=>{var m;(m=o.value)==null||m.setPixelRatio(h.value)}),t.withoutRenderPass||n.watchEffect(()=>{c.value&&l.value&&o.value&&o.value.addPass(new ye(l.value,c.value))});const{render:v}=g.useLoop();return v(()=>{d.frames.value>0&&o.value&&t.enabled&&o.value.render(),d.frames.value=d.mode.value==="always"?1:Math.max(0,d.frames.value-1)}),n.onUnmounted(()=>{var m;(m=o.value)==null||m.dispose()}),(m,A)=>n.renderSlot(m.$slots,"default")}}),M=(r,e)=>{const t=n.inject(Y),o=n.shallowRef(r()),{sizes:a,invalidate:i}=g.useTresContext();e&&n.watch(e,()=>i());const l=n.watchEffect(()=>{!(t!=null&&t.value)||!a.height.value||!a.width.value||(t.value.addPass(o.value),n.nextTick(()=>l()))});return n.onUnmounted(()=>{var c;(c=t==null?void 0:t.value)==null||c.removePass(o.value),o.value.dispose()}),{pass:o}},Ee={uniforms:{tDiffuse:{value:null},tDisp:{value:null},byp:{value:0},amount:{value:.08},angle:{value:.02},seed:{value:.02},seed_x:{value:.02},seed_y:{value:.02},distortion_x:{value:.5},distortion_y:{value:.6},col_s:{value:.05}},vertexShader:`
232
+
233
+ varying vec2 vUv;
234
+ void main() {
235
+ vUv = uv;
236
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
237
+ }`,fragmentShader:`
238
+
239
+ uniform int byp; //should we apply the glitch ?
240
+
241
+ uniform sampler2D tDiffuse;
242
+ uniform sampler2D tDisp;
243
+
244
+ uniform float amount;
245
+ uniform float angle;
246
+ uniform float seed;
247
+ uniform float seed_x;
248
+ uniform float seed_y;
249
+ uniform float distortion_x;
250
+ uniform float distortion_y;
251
+ uniform float col_s;
252
+
253
+ varying vec2 vUv;
254
+
255
+
256
+ float rand(vec2 co){
257
+ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
258
+ }
259
+
260
+ void main() {
261
+ if(byp<1) {
262
+ vec2 p = vUv;
263
+ float xs = floor(gl_FragCoord.x / 0.5);
264
+ float ys = floor(gl_FragCoord.y / 0.5);
265
+ //based on staffantans glitch shader for unity https://github.com/staffantan/unityglitch
266
+ float disp = texture2D(tDisp, p*seed*seed).r;
267
+ if(p.y<distortion_x+col_s && p.y>distortion_x-col_s*seed) {
268
+ if(seed_x>0.){
269
+ p.y = 1. - (p.y + distortion_y);
270
+ }
271
+ else {
272
+ p.y = distortion_y;
273
+ }
274
+ }
275
+ if(p.x<distortion_y+col_s && p.x>distortion_y-col_s*seed) {
276
+ if(seed_y>0.){
277
+ p.x=distortion_x;
278
+ }
279
+ else {
280
+ p.x = 1. - (p.x + distortion_x);
281
+ }
282
+ }
283
+ p.x+=disp*seed_x*(seed/5.);
284
+ p.y+=disp*seed_y*(seed/5.);
285
+ //base from RGB shift shader
286
+ vec2 offset = amount * vec2( cos(angle), sin(angle));
287
+ vec4 cr = texture2D(tDiffuse, p + offset);
288
+ vec4 cga = texture2D(tDiffuse, p);
289
+ vec4 cb = texture2D(tDiffuse, p - offset);
290
+ gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);
291
+ //add noise
292
+ vec4 snow = 200.*amount*vec4(rand(vec2(xs * seed,ys * seed*50.))*0.2);
293
+ gl_FragColor = gl_FragColor+ snow;
294
+ }
295
+ else {
296
+ gl_FragColor=texture2D (tDiffuse, vUv);
297
+ }
298
+ }`};class q extends w{constructor(e=64){super();const t=Ee;this.uniforms=s.UniformsUtils.clone(t.uniforms),this.heightMap=this.generateHeightmap(e),this.uniforms.tDisp.value=this.heightMap,this.material=new s.ShaderMaterial({uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader}),this.fsQuad=new T(this.material),this.goWild=!1,this.curF=0,this.generateTrigger()}render(e,t,o){this.uniforms.tDiffuse.value=o.texture,this.uniforms.seed.value=Math.random(),this.uniforms.byp.value=0,this.curF%this.randX==0||this.goWild==!0?(this.uniforms.amount.value=Math.random()/30,this.uniforms.angle.value=s.MathUtils.randFloat(-Math.PI,Math.PI),this.uniforms.seed_x.value=s.MathUtils.randFloat(-1,1),this.uniforms.seed_y.value=s.MathUtils.randFloat(-1,1),this.uniforms.distortion_x.value=s.MathUtils.randFloat(0,1),this.uniforms.distortion_y.value=s.MathUtils.randFloat(0,1),this.curF=0,this.generateTrigger()):this.curF%this.randX<this.randX/5?(this.uniforms.amount.value=Math.random()/90,this.uniforms.angle.value=s.MathUtils.randFloat(-Math.PI,Math.PI),this.uniforms.distortion_x.value=s.MathUtils.randFloat(0,1),this.uniforms.distortion_y.value=s.MathUtils.randFloat(0,1),this.uniforms.seed_x.value=s.MathUtils.randFloat(-.3,.3),this.uniforms.seed_y.value=s.MathUtils.randFloat(-.3,.3)):this.goWild==!1&&(this.uniforms.byp.value=1),this.curF++,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}generateTrigger(){this.randX=s.MathUtils.randInt(120,240)}generateHeightmap(e){const t=new Float32Array(e*e),o=e*e;for(let i=0;i<o;i++){const l=s.MathUtils.randFloat(0,1);t[i]=l}const a=new s.DataTexture(t,e,e,s.RedFormat,s.FloatType);return a.needsUpdate=!0,a}dispose(){this.material.dispose(),this.heightMap.dispose(),this.fsQuad.dispose()}}const De=n.defineComponent({__name:"Glitch",props:{dtSize:{},goWild:{type:Boolean}},setup(r,{expose:e}){const t=r,{pass:o}=M(()=>new q(t.dtSize),t);e({pass:o});const{onBeforeRender:a}=g.useLoop();return a(({invalidate:i})=>i()),b([[()=>t.goWild,"goWild"]],o,()=>new q),()=>{}}}),D={name:"HalftoneShader",uniforms:{tDiffuse:{value:null},shape:{value:1},radius:{value:4},rotateR:{value:Math.PI/12*1},rotateG:{value:Math.PI/12*2},rotateB:{value:Math.PI/12*3},scatter:{value:0},width:{value:1},height:{value:1},blending:{value:1},blendingMode:{value:1},greyscale:{value:!1},disable:{value:!1}},vertexShader:`
299
+
300
+ varying vec2 vUV;
301
+
302
+ void main() {
303
+
304
+ vUV = uv;
305
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
306
+
307
+ }`,fragmentShader:`
308
+
309
+ #define SQRT2_MINUS_ONE 0.41421356
310
+ #define SQRT2_HALF_MINUS_ONE 0.20710678
311
+ #define PI2 6.28318531
312
+ #define SHAPE_DOT 1
313
+ #define SHAPE_ELLIPSE 2
314
+ #define SHAPE_LINE 3
315
+ #define SHAPE_SQUARE 4
316
+ #define BLENDING_LINEAR 1
317
+ #define BLENDING_MULTIPLY 2
318
+ #define BLENDING_ADD 3
319
+ #define BLENDING_LIGHTER 4
320
+ #define BLENDING_DARKER 5
321
+ uniform sampler2D tDiffuse;
322
+ uniform float radius;
323
+ uniform float rotateR;
324
+ uniform float rotateG;
325
+ uniform float rotateB;
326
+ uniform float scatter;
327
+ uniform float width;
328
+ uniform float height;
329
+ uniform int shape;
330
+ uniform bool disable;
331
+ uniform float blending;
332
+ uniform int blendingMode;
333
+ varying vec2 vUV;
334
+ uniform bool greyscale;
335
+ const int samples = 8;
336
+
337
+ float blend( float a, float b, float t ) {
338
+
339
+ // linear blend
340
+ return a * ( 1.0 - t ) + b * t;
341
+
342
+ }
343
+
344
+ float hypot( float x, float y ) {
345
+
346
+ // vector magnitude
347
+ return sqrt( x * x + y * y );
348
+
349
+ }
350
+
351
+ float rand( vec2 seed ){
352
+
353
+ // get pseudo-random number
354
+ return fract( sin( dot( seed.xy, vec2( 12.9898, 78.233 ) ) ) * 43758.5453 );
355
+
356
+ }
357
+
358
+ float distanceToDotRadius( float channel, vec2 coord, vec2 normal, vec2 p, float angle, float rad_max ) {
359
+
360
+ // apply shape-specific transforms
361
+ float dist = hypot( coord.x - p.x, coord.y - p.y );
362
+ float rad = channel;
363
+
364
+ if ( shape == SHAPE_DOT ) {
365
+
366
+ rad = pow( abs( rad ), 1.125 ) * rad_max;
367
+
368
+ } else if ( shape == SHAPE_ELLIPSE ) {
369
+
370
+ rad = pow( abs( rad ), 1.125 ) * rad_max;
371
+
372
+ if ( dist != 0.0 ) {
373
+ float dot_p = abs( ( p.x - coord.x ) / dist * normal.x + ( p.y - coord.y ) / dist * normal.y );
374
+ dist = ( dist * ( 1.0 - SQRT2_HALF_MINUS_ONE ) ) + dot_p * dist * SQRT2_MINUS_ONE;
375
+ }
376
+
377
+ } else if ( shape == SHAPE_LINE ) {
378
+
379
+ rad = pow( abs( rad ), 1.5) * rad_max;
380
+ float dot_p = ( p.x - coord.x ) * normal.x + ( p.y - coord.y ) * normal.y;
381
+ dist = hypot( normal.x * dot_p, normal.y * dot_p );
382
+
383
+ } else if ( shape == SHAPE_SQUARE ) {
384
+
385
+ float theta = atan( p.y - coord.y, p.x - coord.x ) - angle;
386
+ float sin_t = abs( sin( theta ) );
387
+ float cos_t = abs( cos( theta ) );
388
+ rad = pow( abs( rad ), 1.4 );
389
+ rad = rad_max * ( rad + ( ( sin_t > cos_t ) ? rad - sin_t * rad : rad - cos_t * rad ) );
390
+
391
+ }
392
+
393
+ return rad - dist;
394
+
395
+ }
396
+
397
+ struct Cell {
398
+
399
+ // grid sample positions
400
+ vec2 normal;
401
+ vec2 p1;
402
+ vec2 p2;
403
+ vec2 p3;
404
+ vec2 p4;
405
+ float samp2;
406
+ float samp1;
407
+ float samp3;
408
+ float samp4;
409
+
410
+ };
411
+
412
+ vec4 getSample( vec2 point ) {
413
+
414
+ // multi-sampled point
415
+ vec4 tex = texture2D( tDiffuse, vec2( point.x / width, point.y / height ) );
416
+ float base = rand( vec2( floor( point.x ), floor( point.y ) ) ) * PI2;
417
+ float step = PI2 / float( samples );
418
+ float dist = radius * 0.66;
419
+
420
+ for ( int i = 0; i < samples; ++i ) {
421
+
422
+ float r = base + step * float( i );
423
+ vec2 coord = point + vec2( cos( r ) * dist, sin( r ) * dist );
424
+ tex += texture2D( tDiffuse, vec2( coord.x / width, coord.y / height ) );
425
+
426
+ }
427
+
428
+ tex /= float( samples ) + 1.0;
429
+ return tex;
430
+
431
+ }
432
+
433
+ float getDotColour( Cell c, vec2 p, int channel, float angle, float aa ) {
434
+
435
+ // get colour for given point
436
+ float dist_c_1, dist_c_2, dist_c_3, dist_c_4, res;
437
+
438
+ if ( channel == 0 ) {
439
+
440
+ c.samp1 = getSample( c.p1 ).r;
441
+ c.samp2 = getSample( c.p2 ).r;
442
+ c.samp3 = getSample( c.p3 ).r;
443
+ c.samp4 = getSample( c.p4 ).r;
444
+
445
+ } else if (channel == 1) {
446
+
447
+ c.samp1 = getSample( c.p1 ).g;
448
+ c.samp2 = getSample( c.p2 ).g;
449
+ c.samp3 = getSample( c.p3 ).g;
450
+ c.samp4 = getSample( c.p4 ).g;
451
+
452
+ } else {
453
+
454
+ c.samp1 = getSample( c.p1 ).b;
455
+ c.samp3 = getSample( c.p3 ).b;
456
+ c.samp2 = getSample( c.p2 ).b;
457
+ c.samp4 = getSample( c.p4 ).b;
458
+
459
+ }
460
+
461
+ dist_c_1 = distanceToDotRadius( c.samp1, c.p1, c.normal, p, angle, radius );
462
+ dist_c_2 = distanceToDotRadius( c.samp2, c.p2, c.normal, p, angle, radius );
463
+ dist_c_3 = distanceToDotRadius( c.samp3, c.p3, c.normal, p, angle, radius );
464
+ dist_c_4 = distanceToDotRadius( c.samp4, c.p4, c.normal, p, angle, radius );
465
+ res = ( dist_c_1 > 0.0 ) ? clamp( dist_c_1 / aa, 0.0, 1.0 ) : 0.0;
466
+ res += ( dist_c_2 > 0.0 ) ? clamp( dist_c_2 / aa, 0.0, 1.0 ) : 0.0;
467
+ res += ( dist_c_3 > 0.0 ) ? clamp( dist_c_3 / aa, 0.0, 1.0 ) : 0.0;
468
+ res += ( dist_c_4 > 0.0 ) ? clamp( dist_c_4 / aa, 0.0, 1.0 ) : 0.0;
469
+ res = clamp( res, 0.0, 1.0 );
470
+
471
+ return res;
472
+
473
+ }
474
+
475
+ Cell getReferenceCell( vec2 p, vec2 origin, float grid_angle, float step ) {
476
+
477
+ // get containing cell
478
+ Cell c;
479
+
480
+ // calc grid
481
+ vec2 n = vec2( cos( grid_angle ), sin( grid_angle ) );
482
+ float threshold = step * 0.5;
483
+ float dot_normal = n.x * ( p.x - origin.x ) + n.y * ( p.y - origin.y );
484
+ float dot_line = -n.y * ( p.x - origin.x ) + n.x * ( p.y - origin.y );
485
+ vec2 offset = vec2( n.x * dot_normal, n.y * dot_normal );
486
+ float offset_normal = mod( hypot( offset.x, offset.y ), step );
487
+ float normal_dir = ( dot_normal < 0.0 ) ? 1.0 : -1.0;
488
+ float normal_scale = ( ( offset_normal < threshold ) ? -offset_normal : step - offset_normal ) * normal_dir;
489
+ float offset_line = mod( hypot( ( p.x - offset.x ) - origin.x, ( p.y - offset.y ) - origin.y ), step );
490
+ float line_dir = ( dot_line < 0.0 ) ? 1.0 : -1.0;
491
+ float line_scale = ( ( offset_line < threshold ) ? -offset_line : step - offset_line ) * line_dir;
492
+
493
+ // get closest corner
494
+ c.normal = n;
495
+ c.p1.x = p.x - n.x * normal_scale + n.y * line_scale;
496
+ c.p1.y = p.y - n.y * normal_scale - n.x * line_scale;
497
+
498
+ // scatter
499
+ if ( scatter != 0.0 ) {
500
+
501
+ float off_mag = scatter * threshold * 0.5;
502
+ float off_angle = rand( vec2( floor( c.p1.x ), floor( c.p1.y ) ) ) * PI2;
503
+ c.p1.x += cos( off_angle ) * off_mag;
504
+ c.p1.y += sin( off_angle ) * off_mag;
505
+
506
+ }
507
+
508
+ // find corners
509
+ float normal_step = normal_dir * ( ( offset_normal < threshold ) ? step : -step );
510
+ float line_step = line_dir * ( ( offset_line < threshold ) ? step : -step );
511
+ c.p2.x = c.p1.x - n.x * normal_step;
512
+ c.p2.y = c.p1.y - n.y * normal_step;
513
+ c.p3.x = c.p1.x + n.y * line_step;
514
+ c.p3.y = c.p1.y - n.x * line_step;
515
+ c.p4.x = c.p1.x - n.x * normal_step + n.y * line_step;
516
+ c.p4.y = c.p1.y - n.y * normal_step - n.x * line_step;
517
+
518
+ return c;
519
+
520
+ }
521
+
522
+ float blendColour( float a, float b, float t ) {
523
+
524
+ // blend colours
525
+ if ( blendingMode == BLENDING_LINEAR ) {
526
+ return blend( a, b, 1.0 - t );
527
+ } else if ( blendingMode == BLENDING_ADD ) {
528
+ return blend( a, min( 1.0, a + b ), t );
529
+ } else if ( blendingMode == BLENDING_MULTIPLY ) {
530
+ return blend( a, max( 0.0, a * b ), t );
531
+ } else if ( blendingMode == BLENDING_LIGHTER ) {
532
+ return blend( a, max( a, b ), t );
533
+ } else if ( blendingMode == BLENDING_DARKER ) {
534
+ return blend( a, min( a, b ), t );
535
+ } else {
536
+ return blend( a, b, 1.0 - t );
537
+ }
538
+
539
+ }
540
+
541
+ void main() {
542
+
543
+ if ( ! disable ) {
544
+
545
+ // setup
546
+ vec2 p = vec2( vUV.x * width, vUV.y * height );
547
+ vec2 origin = vec2( 0, 0 );
548
+ float aa = ( radius < 2.5 ) ? radius * 0.5 : 1.25;
549
+
550
+ // get channel samples
551
+ Cell cell_r = getReferenceCell( p, origin, rotateR, radius );
552
+ Cell cell_g = getReferenceCell( p, origin, rotateG, radius );
553
+ Cell cell_b = getReferenceCell( p, origin, rotateB, radius );
554
+ float r = getDotColour( cell_r, p, 0, rotateR, aa );
555
+ float g = getDotColour( cell_g, p, 1, rotateG, aa );
556
+ float b = getDotColour( cell_b, p, 2, rotateB, aa );
557
+
558
+ // blend with original
559
+ vec4 colour = texture2D( tDiffuse, vUV );
560
+ r = blendColour( r, colour.r, blending );
561
+ g = blendColour( g, colour.g, blending );
562
+ b = blendColour( b, colour.b, blending );
563
+
564
+ if ( greyscale ) {
565
+ r = g = b = (r + b + g) / 3.0;
566
+ }
567
+
568
+ gl_FragColor = vec4( r, g, b, 1.0 );
569
+
570
+ } else {
571
+
572
+ gl_FragColor = texture2D( tDiffuse, vUV );
573
+
574
+ }
575
+
576
+ }`};class Pe extends w{constructor(e,t,o){super(),this.uniforms=s.UniformsUtils.clone(D.uniforms),this.material=new s.ShaderMaterial({uniforms:this.uniforms,fragmentShader:D.fragmentShader,vertexShader:D.vertexShader}),this.uniforms.width.value=e,this.uniforms.height.value=t;for(const a in o)o.hasOwnProperty(a)&&this.uniforms.hasOwnProperty(a)&&(this.uniforms[a].value=o[a]);this.fsQuad=new T(this.material)}render(e,t,o){this.material.uniforms.tDiffuse.value=o.texture,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}setSize(e,t){this.uniforms.width.value=e,this.uniforms.height.value=t}dispose(){this.material.dispose(),this.fsQuad.dispose()}}const Le=n.defineComponent({__name:"Halftone",props:{shape:{},radius:{},rotateR:{},rotateG:{},rotateB:{},scatter:{},blending:{},greyscale:{type:Boolean},blendingMode:{}},setup(r,{expose:e}){const t=r,{sizes:o}=g.useTresContext(),a=n.computed(()=>Object.fromEntries(Object.entries(t).filter(([l,c])=>c!==void 0))),{pass:i}=M(()=>new Pe(o.width.value,o.height.value,a.value),t);return e({pass:i}),n.watchEffect(()=>{i.value.setSize(o.width.value,o.height.value)}),n.watchEffect(()=>{Object.entries(t).forEach(([l,c])=>{l in i.value.uniforms&&(i.value.uniforms[l].value=c??D.uniforms[l].value)})}),()=>{}}});class k extends w{constructor(e,t,o,a={}){super(),this.pixelSize=e,this.resolution=new s.Vector2,this.renderResolution=new s.Vector2,this.pixelatedMaterial=this.createPixelatedMaterial(),this.normalMaterial=new s.MeshNormalMaterial,this.fsQuad=new T(this.pixelatedMaterial),this.scene=t,this.camera=o,this.normalEdgeStrength=a.normalEdgeStrength||.3,this.depthEdgeStrength=a.depthEdgeStrength||.4,this.beautyRenderTarget=new s.WebGLRenderTarget,this.beautyRenderTarget.texture.minFilter=s.NearestFilter,this.beautyRenderTarget.texture.magFilter=s.NearestFilter,this.beautyRenderTarget.texture.type=s.HalfFloatType,this.beautyRenderTarget.depthTexture=new s.DepthTexture,this.normalRenderTarget=new s.WebGLRenderTarget,this.normalRenderTarget.texture.minFilter=s.NearestFilter,this.normalRenderTarget.texture.magFilter=s.NearestFilter,this.normalRenderTarget.texture.type=s.HalfFloatType}dispose(){this.beautyRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.pixelatedMaterial.dispose(),this.normalMaterial.dispose(),this.fsQuad.dispose()}setSize(e,t){this.resolution.set(e,t),this.renderResolution.set(e/this.pixelSize|0,t/this.pixelSize|0);const{x:o,y:a}=this.renderResolution;this.beautyRenderTarget.setSize(o,a),this.normalRenderTarget.setSize(o,a),this.fsQuad.material.uniforms.resolution.value.set(o,a,1/o,1/a)}setPixelSize(e){this.pixelSize=e,this.setSize(this.resolution.x,this.resolution.y)}render(e,t){const o=this.fsQuad.material.uniforms;o.normalEdgeStrength.value=this.normalEdgeStrength,o.depthEdgeStrength.value=this.depthEdgeStrength,e.setRenderTarget(this.beautyRenderTarget),e.render(this.scene,this.camera);const a=this.scene.overrideMaterial;e.setRenderTarget(this.normalRenderTarget),this.scene.overrideMaterial=this.normalMaterial,e.render(this.scene,this.camera),this.scene.overrideMaterial=a,o.tDiffuse.value=this.beautyRenderTarget.texture,o.tDepth.value=this.beautyRenderTarget.depthTexture,o.tNormal.value=this.normalRenderTarget.texture,this.renderToScreen?e.setRenderTarget(null):(e.setRenderTarget(t),this.clear&&e.clear()),this.fsQuad.render(e)}createPixelatedMaterial(){return new s.ShaderMaterial({uniforms:{tDiffuse:{value:null},tDepth:{value:null},tNormal:{value:null},resolution:{value:new s.Vector4(this.renderResolution.x,this.renderResolution.y,1/this.renderResolution.x,1/this.renderResolution.y)},normalEdgeStrength:{value:0},depthEdgeStrength:{value:0}},vertexShader:`
577
+ varying vec2 vUv;
578
+
579
+ void main() {
580
+
581
+ vUv = uv;
582
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
583
+
584
+ }
585
+ `,fragmentShader:`
586
+ uniform sampler2D tDiffuse;
587
+ uniform sampler2D tDepth;
588
+ uniform sampler2D tNormal;
589
+ uniform vec4 resolution;
590
+ uniform float normalEdgeStrength;
591
+ uniform float depthEdgeStrength;
592
+ varying vec2 vUv;
593
+
594
+ float getDepth(int x, int y) {
595
+
596
+ return texture2D( tDepth, vUv + vec2(x, y) * resolution.zw ).r;
597
+
598
+ }
599
+
600
+ vec3 getNormal(int x, int y) {
601
+
602
+ return texture2D( tNormal, vUv + vec2(x, y) * resolution.zw ).rgb * 2.0 - 1.0;
603
+
604
+ }
605
+
606
+ float depthEdgeIndicator(float depth, vec3 normal) {
607
+
608
+ float diff = 0.0;
609
+ diff += clamp(getDepth(1, 0) - depth, 0.0, 1.0);
610
+ diff += clamp(getDepth(-1, 0) - depth, 0.0, 1.0);
611
+ diff += clamp(getDepth(0, 1) - depth, 0.0, 1.0);
612
+ diff += clamp(getDepth(0, -1) - depth, 0.0, 1.0);
613
+ return floor(smoothstep(0.01, 0.02, diff) * 2.) / 2.;
614
+
615
+ }
616
+
617
+ float neighborNormalEdgeIndicator(int x, int y, float depth, vec3 normal) {
618
+
619
+ float depthDiff = getDepth(x, y) - depth;
620
+ vec3 neighborNormal = getNormal(x, y);
621
+
622
+ // Edge pixels should yield to faces who's normals are closer to the bias normal.
623
+ vec3 normalEdgeBias = vec3(1., 1., 1.); // This should probably be a parameter.
624
+ float normalDiff = dot(normal - neighborNormal, normalEdgeBias);
625
+ float normalIndicator = clamp(smoothstep(-.01, .01, normalDiff), 0.0, 1.0);
626
+
627
+ // Only the shallower pixel should detect the normal edge.
628
+ float depthIndicator = clamp(sign(depthDiff * .25 + .0025), 0.0, 1.0);
629
+
630
+ return (1.0 - dot(normal, neighborNormal)) * depthIndicator * normalIndicator;
631
+
632
+ }
633
+
634
+ float normalEdgeIndicator(float depth, vec3 normal) {
635
+
636
+ float indicator = 0.0;
637
+
638
+ indicator += neighborNormalEdgeIndicator(0, -1, depth, normal);
639
+ indicator += neighborNormalEdgeIndicator(0, 1, depth, normal);
640
+ indicator += neighborNormalEdgeIndicator(-1, 0, depth, normal);
641
+ indicator += neighborNormalEdgeIndicator(1, 0, depth, normal);
642
+
643
+ return step(0.1, indicator);
644
+
645
+ }
646
+
647
+ void main() {
648
+
649
+ vec4 texel = texture2D( tDiffuse, vUv );
650
+
651
+ float depth = 0.0;
652
+ vec3 normal = vec3(0.0);
653
+
654
+ if (depthEdgeStrength > 0.0 || normalEdgeStrength > 0.0) {
655
+
656
+ depth = getDepth(0, 0);
657
+ normal = getNormal(0, 0);
658
+
659
+ }
660
+
661
+ float dei = 0.0;
662
+ if (depthEdgeStrength > 0.0)
663
+ dei = depthEdgeIndicator(depth, normal);
664
+
665
+ float nei = 0.0;
666
+ if (normalEdgeStrength > 0.0)
667
+ nei = normalEdgeIndicator(depth, normal);
668
+
669
+ float Strength = dei > 0.0 ? (1.0 - depthEdgeStrength * dei) : (1.0 + normalEdgeStrength * nei);
670
+
671
+ gl_FragColor = texel * Strength;
672
+
673
+ }
674
+ `})}}const Re=n.defineComponent({__name:"Pixelation",props:{pixelSize:{},depthEdgeStrength:{},normalEdgeStrength:{}},setup(r,{expose:e}){const t=r,{scene:o,camera:a}=g.useTresContext(),{pass:i}=M(()=>new k(t.pixelSize,o.value,a.value),t);return e({pass:i}),n.watchEffect(()=>{i.value.setPixelSize(t.pixelSize)}),b([[()=>t.depthEdgeStrength,"depthEdgeStrength"],[()=>t.normalEdgeStrength,"normalEdgeStrength"]],i,()=>new k(1,o.value,a.value)),()=>{}}}),Oe={name:"OutputShader",uniforms:{tDiffuse:{value:null},toneMappingExposure:{value:1}},vertexShader:`
675
+ precision highp float;
676
+
677
+ uniform mat4 modelViewMatrix;
678
+ uniform mat4 projectionMatrix;
679
+
680
+ attribute vec3 position;
681
+ attribute vec2 uv;
682
+
683
+ varying vec2 vUv;
684
+
685
+ void main() {
686
+
687
+ vUv = uv;
688
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
689
+
690
+ }`,fragmentShader:`
691
+
692
+ precision highp float;
693
+
694
+ uniform sampler2D tDiffuse;
695
+
696
+ #include <tonemapping_pars_fragment>
697
+ #include <colorspace_pars_fragment>
698
+
699
+ varying vec2 vUv;
700
+
701
+ void main() {
702
+
703
+ gl_FragColor = texture2D( tDiffuse, vUv );
704
+
705
+ // tone mapping
706
+
707
+ #ifdef LINEAR_TONE_MAPPING
708
+
709
+ gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );
710
+
711
+ #elif defined( REINHARD_TONE_MAPPING )
712
+
713
+ gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );
714
+
715
+ #elif defined( CINEON_TONE_MAPPING )
716
+
717
+ gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );
718
+
719
+ #elif defined( ACES_FILMIC_TONE_MAPPING )
720
+
721
+ gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );
722
+
723
+ #elif defined( AGX_TONE_MAPPING )
724
+
725
+ gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );
726
+
727
+ #elif defined( NEUTRAL_TONE_MAPPING )
728
+
729
+ gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );
730
+
731
+ #endif
732
+
733
+ // color space
734
+
735
+ #ifdef SRGB_TRANSFER
736
+
737
+ gl_FragColor = sRGBTransferOETF( gl_FragColor );
738
+
739
+ #endif
740
+
741
+ }`};class Be extends w{constructor(){super();const e=Oe;this.uniforms=s.UniformsUtils.clone(e.uniforms),this.material=new s.RawShaderMaterial({name:e.name,uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader}),this.fsQuad=new T(this.material),this._outputColorSpace=null,this._toneMapping=null}render(e,t,o){this.uniforms.tDiffuse.value=o.texture,this.uniforms.toneMappingExposure.value=e.toneMappingExposure,(this._outputColorSpace!==e.outputColorSpace||this._toneMapping!==e.toneMapping)&&(this._outputColorSpace=e.outputColorSpace,this._toneMapping=e.toneMapping,this.material.defines={},s.ColorManagement.getTransfer(this._outputColorSpace)===s.SRGBTransfer&&(this.material.defines.SRGB_TRANSFER=""),this._toneMapping===s.LinearToneMapping?this.material.defines.LINEAR_TONE_MAPPING="":this._toneMapping===s.ReinhardToneMapping?this.material.defines.REINHARD_TONE_MAPPING="":this._toneMapping===s.CineonToneMapping?this.material.defines.CINEON_TONE_MAPPING="":this._toneMapping===s.ACESFilmicToneMapping?this.material.defines.ACES_FILMIC_TONE_MAPPING="":this._toneMapping===s.AgXToneMapping?this.material.defines.AGX_TONE_MAPPING="":this._toneMapping===s.NeutralToneMapping&&(this.material.defines.NEUTRAL_TONE_MAPPING=""),this.material.needsUpdate=!0),this.renderToScreen===!0?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}const Ne=n.defineComponent({__name:"Output",setup(r,{expose:e}){const{pass:t}=M(()=>new Be);return e({pass:t}),()=>{}}}),P={name:"SMAAEdgesShader",defines:{SMAA_THRESHOLD:"0.1"},uniforms:{tDiffuse:{value:null},resolution:{value:new s.Vector2(1/1024,1/512)}},vertexShader:`
742
+
743
+ uniform vec2 resolution;
744
+
745
+ varying vec2 vUv;
746
+ varying vec4 vOffset[ 3 ];
747
+
748
+ void SMAAEdgeDetectionVS( vec2 texcoord ) {
749
+ vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component
750
+ vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component
751
+ vOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 ); // WebGL port note: Changed sign in W component
752
+ }
753
+
754
+ void main() {
755
+
756
+ vUv = uv;
757
+
758
+ SMAAEdgeDetectionVS( vUv );
759
+
760
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
761
+
762
+ }`,fragmentShader:`
763
+
764
+ uniform sampler2D tDiffuse;
765
+
766
+ varying vec2 vUv;
767
+ varying vec4 vOffset[ 3 ];
768
+
769
+ vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {
770
+ vec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );
771
+
772
+ // Calculate color deltas:
773
+ vec4 delta;
774
+ vec3 C = texture2D( colorTex, texcoord ).rgb;
775
+
776
+ vec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;
777
+ vec3 t = abs( C - Cleft );
778
+ delta.x = max( max( t.r, t.g ), t.b );
779
+
780
+ vec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;
781
+ t = abs( C - Ctop );
782
+ delta.y = max( max( t.r, t.g ), t.b );
783
+
784
+ // We do the usual threshold:
785
+ vec2 edges = step( threshold, delta.xy );
786
+
787
+ // Then discard if there is no edge:
788
+ if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )
789
+ discard;
790
+
791
+ // Calculate right and bottom deltas:
792
+ vec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;
793
+ t = abs( C - Cright );
794
+ delta.z = max( max( t.r, t.g ), t.b );
795
+
796
+ vec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;
797
+ t = abs( C - Cbottom );
798
+ delta.w = max( max( t.r, t.g ), t.b );
799
+
800
+ // Calculate the maximum delta in the direct neighborhood:
801
+ float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );
802
+
803
+ // Calculate left-left and top-top deltas:
804
+ vec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;
805
+ t = abs( C - Cleftleft );
806
+ delta.z = max( max( t.r, t.g ), t.b );
807
+
808
+ vec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;
809
+ t = abs( C - Ctoptop );
810
+ delta.w = max( max( t.r, t.g ), t.b );
811
+
812
+ // Calculate the final maximum delta:
813
+ maxDelta = max( max( maxDelta, delta.z ), delta.w );
814
+
815
+ // Local contrast adaptation in action:
816
+ edges.xy *= step( 0.5 * maxDelta, delta.xy );
817
+
818
+ return vec4( edges, 0.0, 0.0 );
819
+ }
820
+
821
+ void main() {
822
+
823
+ gl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );
824
+
825
+ }`},L={name:"SMAAWeightsShader",defines:{SMAA_MAX_SEARCH_STEPS:"8",SMAA_AREATEX_MAX_DISTANCE:"16",SMAA_AREATEX_PIXEL_SIZE:"( 1.0 / vec2( 160.0, 560.0 ) )",SMAA_AREATEX_SUBTEX_SIZE:"( 1.0 / 7.0 )"},uniforms:{tDiffuse:{value:null},tArea:{value:null},tSearch:{value:null},resolution:{value:new s.Vector2(1/1024,1/512)}},vertexShader:`
826
+
827
+ uniform vec2 resolution;
828
+
829
+ varying vec2 vUv;
830
+ varying vec4 vOffset[ 3 ];
831
+ varying vec2 vPixcoord;
832
+
833
+ void SMAABlendingWeightCalculationVS( vec2 texcoord ) {
834
+ vPixcoord = texcoord / resolution;
835
+
836
+ // We will use these offsets for the searches later on (see @PSEUDO_GATHER4):
837
+ vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 ); // WebGL port note: Changed sign in Y and W components
838
+ vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 ); // WebGL port note: Changed sign in Y and W components
839
+
840
+ // And these for the searches, they indicate the ends of the loops:
841
+ vOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );
842
+
843
+ }
844
+
845
+ void main() {
846
+
847
+ vUv = uv;
848
+
849
+ SMAABlendingWeightCalculationVS( vUv );
850
+
851
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
852
+
853
+ }`,fragmentShader:`
854
+
855
+ #define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )
856
+
857
+ uniform sampler2D tDiffuse;
858
+ uniform sampler2D tArea;
859
+ uniform sampler2D tSearch;
860
+ uniform vec2 resolution;
861
+
862
+ varying vec2 vUv;
863
+ varying vec4 vOffset[3];
864
+ varying vec2 vPixcoord;
865
+
866
+ #if __VERSION__ == 100
867
+ vec2 round( vec2 x ) {
868
+ return sign( x ) * floor( abs( x ) + 0.5 );
869
+ }
870
+ #endif
871
+
872
+ float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {
873
+ // Not required if searchTex accesses are set to point:
874
+ // float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0);
875
+ // e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE +
876
+ // e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE;
877
+ e.r = bias + e.r * scale;
878
+ return 255.0 * texture2D( searchTex, e, 0.0 ).r;
879
+ }
880
+
881
+ float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
882
+ /**
883
+ * @PSEUDO_GATHER4
884
+ * This texcoord has been offset by (-0.25, -0.125) in the vertex shader to
885
+ * sample between edge, thus fetching four edges in a row.
886
+ * Sampling with different offsets in each direction allows to disambiguate
887
+ * which edges are active from the four fetched ones.
888
+ */
889
+ vec2 e = vec2( 0.0, 1.0 );
890
+
891
+ for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
892
+ e = texture2D( edgesTex, texcoord, 0.0 ).rg;
893
+ texcoord -= vec2( 2.0, 0.0 ) * resolution;
894
+ if ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;
895
+ }
896
+
897
+ // We correct the previous (-0.25, -0.125) offset we applied:
898
+ texcoord.x += 0.25 * resolution.x;
899
+
900
+ // The searches are bias by 1, so adjust the coords accordingly:
901
+ texcoord.x += resolution.x;
902
+
903
+ // Disambiguate the length added by the last step:
904
+ texcoord.x += 2.0 * resolution.x; // Undo last step
905
+ texcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);
906
+
907
+ return texcoord.x;
908
+ }
909
+
910
+ float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
911
+ vec2 e = vec2( 0.0, 1.0 );
912
+
913
+ for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
914
+ e = texture2D( edgesTex, texcoord, 0.0 ).rg;
915
+ texcoord += vec2( 2.0, 0.0 ) * resolution;
916
+ if ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;
917
+ }
918
+
919
+ texcoord.x -= 0.25 * resolution.x;
920
+ texcoord.x -= resolution.x;
921
+ texcoord.x -= 2.0 * resolution.x;
922
+ texcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );
923
+
924
+ return texcoord.x;
925
+ }
926
+
927
+ float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
928
+ vec2 e = vec2( 1.0, 0.0 );
929
+
930
+ for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
931
+ e = texture2D( edgesTex, texcoord, 0.0 ).rg;
932
+ texcoord += vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign
933
+ if ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;
934
+ }
935
+
936
+ texcoord.y -= 0.25 * resolution.y; // WebGL port note: Changed sign
937
+ texcoord.y -= resolution.y; // WebGL port note: Changed sign
938
+ texcoord.y -= 2.0 * resolution.y; // WebGL port note: Changed sign
939
+ texcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 ); // WebGL port note: Changed sign
940
+
941
+ return texcoord.y;
942
+ }
943
+
944
+ float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
945
+ vec2 e = vec2( 1.0, 0.0 );
946
+
947
+ for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for
948
+ e = texture2D( edgesTex, texcoord, 0.0 ).rg;
949
+ texcoord -= vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign
950
+ if ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;
951
+ }
952
+
953
+ texcoord.y += 0.25 * resolution.y; // WebGL port note: Changed sign
954
+ texcoord.y += resolution.y; // WebGL port note: Changed sign
955
+ texcoord.y += 2.0 * resolution.y; // WebGL port note: Changed sign
956
+ texcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 ); // WebGL port note: Changed sign
957
+
958
+ return texcoord.y;
959
+ }
960
+
961
+ vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {
962
+ // Rounding prevents precision errors of bilinear filtering:
963
+ vec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;
964
+
965
+ // We do a scale and bias for mapping to texel space:
966
+ texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );
967
+
968
+ // Move to proper place, according to the subpixel offset:
969
+ texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;
970
+
971
+ return texture2D( areaTex, texcoord, 0.0 ).rg;
972
+ }
973
+
974
+ vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {
975
+ vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );
976
+
977
+ vec2 e = texture2D( edgesTex, texcoord ).rg;
978
+
979
+ if ( e.g > 0.0 ) { // Edge at north
980
+ vec2 d;
981
+
982
+ // Find the distance to the left:
983
+ vec2 coords;
984
+ coords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );
985
+ coords.y = offset[ 1 ].y; // offset[1].y = texcoord.y - 0.25 * resolution.y (@CROSSING_OFFSET)
986
+ d.x = coords.x;
987
+
988
+ // Now fetch the left crossing edges, two at a time using bilinear
989
+ // filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to
990
+ // discern what value each edge has:
991
+ float e1 = texture2D( edgesTex, coords, 0.0 ).r;
992
+
993
+ // Find the distance to the right:
994
+ coords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );
995
+ d.y = coords.x;
996
+
997
+ // We want the distances to be in pixel units (doing this here allow to
998
+ // better interleave arithmetic and memory accesses):
999
+ d = d / resolution.x - pixcoord.x;
1000
+
1001
+ // SMAAArea below needs a sqrt, as the areas texture is compressed
1002
+ // quadratically:
1003
+ vec2 sqrt_d = sqrt( abs( d ) );
1004
+
1005
+ // Fetch the right crossing edges:
1006
+ coords.y -= 1.0 * resolution.y; // WebGL port note: Added
1007
+ float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;
1008
+
1009
+ // Ok, we know how this pattern looks like, now it is time for getting
1010
+ // the actual area:
1011
+ weights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );
1012
+ }
1013
+
1014
+ if ( e.r > 0.0 ) { // Edge at west
1015
+ vec2 d;
1016
+
1017
+ // Find the distance to the top:
1018
+ vec2 coords;
1019
+
1020
+ coords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );
1021
+ coords.x = offset[ 0 ].x; // offset[1].x = texcoord.x - 0.25 * resolution.x;
1022
+ d.x = coords.y;
1023
+
1024
+ // Fetch the top crossing edges:
1025
+ float e1 = texture2D( edgesTex, coords, 0.0 ).g;
1026
+
1027
+ // Find the distance to the bottom:
1028
+ coords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );
1029
+ d.y = coords.y;
1030
+
1031
+ // We want the distances to be in pixel units:
1032
+ d = d / resolution.y - pixcoord.y;
1033
+
1034
+ // SMAAArea below needs a sqrt, as the areas texture is compressed
1035
+ // quadratically:
1036
+ vec2 sqrt_d = sqrt( abs( d ) );
1037
+
1038
+ // Fetch the bottom crossing edges:
1039
+ coords.y -= 1.0 * resolution.y; // WebGL port note: Added
1040
+ float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;
1041
+
1042
+ // Get the area for this direction:
1043
+ weights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );
1044
+ }
1045
+
1046
+ return weights;
1047
+ }
1048
+
1049
+ void main() {
1050
+
1051
+ gl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );
1052
+
1053
+ }`},N={name:"SMAABlendShader",uniforms:{tDiffuse:{value:null},tColor:{value:null},resolution:{value:new s.Vector2(1/1024,1/512)}},vertexShader:`
1054
+
1055
+ uniform vec2 resolution;
1056
+
1057
+ varying vec2 vUv;
1058
+ varying vec4 vOffset[ 2 ];
1059
+
1060
+ void SMAANeighborhoodBlendingVS( vec2 texcoord ) {
1061
+ vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component
1062
+ vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component
1063
+ }
1064
+
1065
+ void main() {
1066
+
1067
+ vUv = uv;
1068
+
1069
+ SMAANeighborhoodBlendingVS( vUv );
1070
+
1071
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1072
+
1073
+ }`,fragmentShader:`
1074
+
1075
+ uniform sampler2D tDiffuse;
1076
+ uniform sampler2D tColor;
1077
+ uniform vec2 resolution;
1078
+
1079
+ varying vec2 vUv;
1080
+ varying vec4 vOffset[ 2 ];
1081
+
1082
+ vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {
1083
+ // Fetch the blending weights for current pixel:
1084
+ vec4 a;
1085
+ a.xz = texture2D( blendTex, texcoord ).xz;
1086
+ a.y = texture2D( blendTex, offset[ 1 ].zw ).g;
1087
+ a.w = texture2D( blendTex, offset[ 1 ].xy ).a;
1088
+
1089
+ // Is there any blending weight with a value greater than 0.0?
1090
+ if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {
1091
+ return texture2D( colorTex, texcoord, 0.0 );
1092
+ } else {
1093
+ // Up to 4 lines can be crossing a pixel (one through each edge). We
1094
+ // favor blending by choosing the line with the maximum weight for each
1095
+ // direction:
1096
+ vec2 offset;
1097
+ offset.x = a.a > a.b ? a.a : -a.b; // left vs. right
1098
+ offset.y = a.g > a.r ? -a.g : a.r; // top vs. bottom // WebGL port note: Changed signs
1099
+
1100
+ // Then we go in the direction that has the maximum weight:
1101
+ if ( abs( offset.x ) > abs( offset.y )) { // horizontal vs. vertical
1102
+ offset.y = 0.0;
1103
+ } else {
1104
+ offset.x = 0.0;
1105
+ }
1106
+
1107
+ // Fetch the opposite color and lerp by hand:
1108
+ vec4 C = texture2D( colorTex, texcoord, 0.0 );
1109
+ texcoord += sign( offset ) * resolution;
1110
+ vec4 Cop = texture2D( colorTex, texcoord, 0.0 );
1111
+ float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );
1112
+
1113
+ // WebGL port note: Added gamma correction
1114
+ C.xyz = pow(C.xyz, vec3(2.2));
1115
+ Cop.xyz = pow(Cop.xyz, vec3(2.2));
1116
+ vec4 mixed = mix(C, Cop, s);
1117
+ mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));
1118
+
1119
+ return mixed;
1120
+ }
1121
+ }
1122
+
1123
+ void main() {
1124
+
1125
+ gl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );
1126
+
1127
+ }`};class Fe extends w{constructor(e,t){super(),this.edgesRT=new s.WebGLRenderTarget(e,t,{depthBuffer:!1,type:s.HalfFloatType}),this.edgesRT.texture.name="SMAAPass.edges",this.weightsRT=new s.WebGLRenderTarget(e,t,{depthBuffer:!1,type:s.HalfFloatType}),this.weightsRT.texture.name="SMAAPass.weights";const o=this,a=new Image;a.src=this.getAreaTexture(),a.onload=function(){o.areaTexture.needsUpdate=!0},this.areaTexture=new s.Texture,this.areaTexture.name="SMAAPass.area",this.areaTexture.image=a,this.areaTexture.minFilter=s.LinearFilter,this.areaTexture.generateMipmaps=!1,this.areaTexture.flipY=!1;const i=new Image;i.src=this.getSearchTexture(),i.onload=function(){o.searchTexture.needsUpdate=!0},this.searchTexture=new s.Texture,this.searchTexture.name="SMAAPass.search",this.searchTexture.image=i,this.searchTexture.magFilter=s.NearestFilter,this.searchTexture.minFilter=s.NearestFilter,this.searchTexture.generateMipmaps=!1,this.searchTexture.flipY=!1,this.uniformsEdges=s.UniformsUtils.clone(P.uniforms),this.uniformsEdges.resolution.value.set(1/e,1/t),this.materialEdges=new s.ShaderMaterial({defines:Object.assign({},P.defines),uniforms:this.uniformsEdges,vertexShader:P.vertexShader,fragmentShader:P.fragmentShader}),this.uniformsWeights=s.UniformsUtils.clone(L.uniforms),this.uniformsWeights.resolution.value.set(1/e,1/t),this.uniformsWeights.tDiffuse.value=this.edgesRT.texture,this.uniformsWeights.tArea.value=this.areaTexture,this.uniformsWeights.tSearch.value=this.searchTexture,this.materialWeights=new s.ShaderMaterial({defines:Object.assign({},L.defines),uniforms:this.uniformsWeights,vertexShader:L.vertexShader,fragmentShader:L.fragmentShader}),this.uniformsBlend=s.UniformsUtils.clone(N.uniforms),this.uniformsBlend.resolution.value.set(1/e,1/t),this.uniformsBlend.tDiffuse.value=this.weightsRT.texture,this.materialBlend=new s.ShaderMaterial({uniforms:this.uniformsBlend,vertexShader:N.vertexShader,fragmentShader:N.fragmentShader}),this.fsQuad=new T(null)}render(e,t,o){this.uniformsEdges.tDiffuse.value=o.texture,this.fsQuad.material=this.materialEdges,e.setRenderTarget(this.edgesRT),this.clear&&e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.materialWeights,e.setRenderTarget(this.weightsRT),this.clear&&e.clear(),this.fsQuad.render(e),this.uniformsBlend.tColor.value=o.texture,this.fsQuad.material=this.materialBlend,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}setSize(e,t){this.edgesRT.setSize(e,t),this.weightsRT.setSize(e,t),this.materialEdges.uniforms.resolution.value.set(1/e,1/t),this.materialWeights.uniforms.resolution.value.set(1/e,1/t),this.materialBlend.uniforms.resolution.value.set(1/e,1/t)}getAreaTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4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V1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="}getSearchTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="}dispose(){this.edgesRT.dispose(),this.weightsRT.dispose(),this.areaTexture.dispose(),this.searchTexture.dispose(),this.materialEdges.dispose(),this.materialWeights.dispose(),this.materialBlend.dispose(),this.fsQuad.dispose()}}const ze=n.defineComponent({__name:"SMAA",props:{width:{},height:{}},setup(r,{expose:e}){const t=r,{sizes:o}=g.useTresContext(),{pixelRatio:a}=F.useDevicePixelRatio(),i=n.computed(()=>t.width??o.width.value*a.value),l=n.computed(()=>t.height??o.height.value*a.value),{pass:c}=M(()=>new Fe(i.value,l.value),t);return e({pass:c}),n.watchEffect(()=>{c.value.setSize(i.value,l.value)}),()=>{}}}),Q={name:"LuminosityHighPassShader",shaderID:"luminosityHighPass",uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new s.Color(0)},defaultOpacity:{value:0}},vertexShader:`
1128
+
1129
+ varying vec2 vUv;
1130
+
1131
+ void main() {
1132
+
1133
+ vUv = uv;
1134
+
1135
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1136
+
1137
+ }`,fragmentShader:`
1138
+
1139
+ uniform sampler2D tDiffuse;
1140
+ uniform vec3 defaultColor;
1141
+ uniform float defaultOpacity;
1142
+ uniform float luminosityThreshold;
1143
+ uniform float smoothWidth;
1144
+
1145
+ varying vec2 vUv;
1146
+
1147
+ void main() {
1148
+
1149
+ vec4 texel = texture2D( tDiffuse, vUv );
1150
+
1151
+ float v = luminance( texel.xyz );
1152
+
1153
+ vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );
1154
+
1155
+ float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );
1156
+
1157
+ gl_FragColor = mix( outputColor, texel, alpha );
1158
+
1159
+ }`};class y extends w{constructor(e,t,o,a){super(),this.strength=t!==void 0?t:1,this.radius=o,this.threshold=a,this.resolution=e!==void 0?new s.Vector2(e.x,e.y):new s.Vector2(256,256),this.clearColor=new s.Color(0,0,0),this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let i=Math.round(this.resolution.x/2),l=Math.round(this.resolution.y/2);this.renderTargetBright=new s.WebGLRenderTarget(i,l,{type:s.HalfFloatType}),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let v=0;v<this.nMips;v++){const m=new s.WebGLRenderTarget(i,l,{type:s.HalfFloatType});m.texture.name="UnrealBloomPass.h"+v,m.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(m);const A=new s.WebGLRenderTarget(i,l,{type:s.HalfFloatType});A.texture.name="UnrealBloomPass.v"+v,A.texture.generateMipmaps=!1,this.renderTargetsVertical.push(A),i=Math.round(i/2),l=Math.round(l/2)}const c=Q;this.highPassUniforms=s.UniformsUtils.clone(c.uniforms),this.highPassUniforms.luminosityThreshold.value=a,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new s.ShaderMaterial({uniforms:this.highPassUniforms,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader}),this.separableBlurMaterials=[];const d=[3,5,7,9,11];i=Math.round(this.resolution.x/2),l=Math.round(this.resolution.y/2);for(let v=0;v<this.nMips;v++)this.separableBlurMaterials.push(this.getSeparableBlurMaterial(d[v])),this.separableBlurMaterials[v].uniforms.invSize.value=new s.Vector2(1/i,1/l),i=Math.round(i/2),l=Math.round(l/2);this.compositeMaterial=this.getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=t,this.compositeMaterial.uniforms.bloomRadius.value=.1;const S=[1,.8,.6,.4,.2];this.compositeMaterial.uniforms.bloomFactors.value=S,this.bloomTintColors=[new s.Vector3(1,1,1),new s.Vector3(1,1,1),new s.Vector3(1,1,1),new s.Vector3(1,1,1),new s.Vector3(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors;const h=I;this.copyUniforms=s.UniformsUtils.clone(h.uniforms),this.blendMaterial=new s.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:h.vertexShader,fragmentShader:h.fragmentShader,blending:s.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new s.Color,this.oldClearAlpha=1,this.basic=new s.MeshBasicMaterial,this.fsQuad=new T(null)}dispose(){for(let e=0;e<this.renderTargetsHorizontal.length;e++)this.renderTargetsHorizontal[e].dispose();for(let e=0;e<this.renderTargetsVertical.length;e++)this.renderTargetsVertical[e].dispose();this.renderTargetBright.dispose();for(let e=0;e<this.separableBlurMaterials.length;e++)this.separableBlurMaterials[e].dispose();this.compositeMaterial.dispose(),this.blendMaterial.dispose(),this.basic.dispose(),this.fsQuad.dispose()}setSize(e,t){let o=Math.round(e/2),a=Math.round(t/2);this.renderTargetBright.setSize(o,a);for(let i=0;i<this.nMips;i++)this.renderTargetsHorizontal[i].setSize(o,a),this.renderTargetsVertical[i].setSize(o,a),this.separableBlurMaterials[i].uniforms.invSize.value=new s.Vector2(1/o,1/a),o=Math.round(o/2),a=Math.round(a/2)}render(e,t,o,a,i){e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();const l=e.autoClear;e.autoClear=!1,e.setClearColor(this.clearColor,0),i&&e.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this.fsQuad.material=this.basic,this.basic.map=o.texture,e.setRenderTarget(null),e.clear(),this.fsQuad.render(e)),this.highPassUniforms.tDiffuse.value=o.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.fsQuad.material=this.materialHighPassFilter,e.setRenderTarget(this.renderTargetBright),e.clear(),this.fsQuad.render(e);let c=this.renderTargetBright;for(let d=0;d<this.nMips;d++)this.fsQuad.material=this.separableBlurMaterials[d],this.separableBlurMaterials[d].uniforms.colorTexture.value=c.texture,this.separableBlurMaterials[d].uniforms.direction.value=y.BlurDirectionX,e.setRenderTarget(this.renderTargetsHorizontal[d]),e.clear(),this.fsQuad.render(e),this.separableBlurMaterials[d].uniforms.colorTexture.value=this.renderTargetsHorizontal[d].texture,this.separableBlurMaterials[d].uniforms.direction.value=y.BlurDirectionY,e.setRenderTarget(this.renderTargetsVertical[d]),e.clear(),this.fsQuad.render(e),c=this.renderTargetsVertical[d];this.fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,e.setRenderTarget(this.renderTargetsHorizontal[0]),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.blendMaterial,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,i&&e.state.buffers.stencil.setTest(!0),this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(o),this.fsQuad.render(e)),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=l}getSeparableBlurMaterial(e){const t=[];for(let o=0;o<e;o++)t.push(.39894*Math.exp(-.5*o*o/(e*e))/e);return new s.ShaderMaterial({defines:{KERNEL_RADIUS:e},uniforms:{colorTexture:{value:null},invSize:{value:new s.Vector2(.5,.5)},direction:{value:new s.Vector2(.5,.5)},gaussianCoefficients:{value:t}},vertexShader:`varying vec2 vUv;
1160
+ void main() {
1161
+ vUv = uv;
1162
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1163
+ }`,fragmentShader:`#include <common>
1164
+ varying vec2 vUv;
1165
+ uniform sampler2D colorTexture;
1166
+ uniform vec2 invSize;
1167
+ uniform vec2 direction;
1168
+ uniform float gaussianCoefficients[KERNEL_RADIUS];
1169
+
1170
+ void main() {
1171
+ float weightSum = gaussianCoefficients[0];
1172
+ vec3 diffuseSum = texture2D( colorTexture, vUv ).rgb * weightSum;
1173
+ for( int i = 1; i < KERNEL_RADIUS; i ++ ) {
1174
+ float x = float(i);
1175
+ float w = gaussianCoefficients[i];
1176
+ vec2 uvOffset = direction * invSize * x;
1177
+ vec3 sample1 = texture2D( colorTexture, vUv + uvOffset ).rgb;
1178
+ vec3 sample2 = texture2D( colorTexture, vUv - uvOffset ).rgb;
1179
+ diffuseSum += (sample1 + sample2) * w;
1180
+ weightSum += 2.0 * w;
1181
+ }
1182
+ gl_FragColor = vec4(diffuseSum/weightSum, 1.0);
1183
+ }`})}getCompositeMaterial(e){return new s.ShaderMaterial({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv;
1184
+ void main() {
1185
+ vUv = uv;
1186
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
1187
+ }`,fragmentShader:`varying vec2 vUv;
1188
+ uniform sampler2D blurTexture1;
1189
+ uniform sampler2D blurTexture2;
1190
+ uniform sampler2D blurTexture3;
1191
+ uniform sampler2D blurTexture4;
1192
+ uniform sampler2D blurTexture5;
1193
+ uniform float bloomStrength;
1194
+ uniform float bloomRadius;
1195
+ uniform float bloomFactors[NUM_MIPS];
1196
+ uniform vec3 bloomTintColors[NUM_MIPS];
1197
+
1198
+ float lerpBloomFactor(const in float factor) {
1199
+ float mirrorFactor = 1.2 - factor;
1200
+ return mix(factor, mirrorFactor, bloomRadius);
1201
+ }
1202
+
1203
+ void main() {
1204
+ gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +
1205
+ lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +
1206
+ lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +
1207
+ lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +
1208
+ lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );
1209
+ }`})}}y.BlurDirectionX=new s.Vector2(1,0),y.BlurDirectionY=new s.Vector2(0,1);const Ue=n.defineComponent({__name:"UnrealBloom",props:{radius:{default:0},strength:{default:1},threshold:{default:0}},setup(r,{expose:e}){const t=r,{sizes:o}=g.useTresContext(),{pass:a}=M(()=>new y(new s.Vector2(o.width.value,o.height.value),t.radius,t.strength,t.threshold),t);return e({pass:a}),n.watchEffect(()=>{var i;a.value.radius=t.radius??((i=a.value.getCompositeMaterial().uniforms.bloomRadius)==null?void 0:i.value)??.1}),n.watchEffect(()=>{var i;a.value.strength=t.strength??((i=a.value.getCompositeMaterial().uniforms.bloomStrength)==null?void 0:i.value)??1}),n.watchEffect(()=>{var i;a.value.threshold=t.threshold??((i=Q.uniforms.luminosityThreshold)==null?void 0:i.value)??1}),()=>{}}});u.BarrelBlurPmndrs=se,u.BloomPmndrs=_,u.ChromaticAberrationPmndrs=ne,u.ColorAveragePmndrs=de,u.DepthOfFieldPmndrs=$,u.DotScreenPmndrs=ge,u.EffectComposer=Ce,u.EffectComposerPmndrs=Z,u.Glitch=De,u.GlitchPmndrs=ee,u.Halftone=Le,u.HueSaturationPmndrs=le,u.KuwaharaPmndrs=ue,u.LensDistortionPmndrs=he,u.LinocutPmndrs=xe,u.NoisePmndrs=te,u.OutlinePmndrs=oe,u.Output=Ne,u.Pixelation=Re,u.PixelationPmndrs=ae,u.SMAA=ze,u.ScanlinePmndrs=ce,u.SepiaPmndrs=ve,u.ShockWavePmndrs=me,u.TiltShiftPmndrs=pe,u.ToneMappingPmndrs=re,u.UnrealBloom=Ue,u.VignettePmndrs=ie,u.useEffect=M,u.useEffectPmndrs=p,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});