1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[326],{13576:(t,e,r)=>{r.d(e,{a:()=>s,b:()=>i,c:()=>h,d:()=>l,e:()=>u,f:()=>n});var a=new Map;function s(t,e){a.set(t,e)}function i(t){return a.get(t)}function h(){return a}var o=new Map;function l(t,e){o.set(t,e)}function u(t){return o.get(t)}var _=new Set;function n(t,e){let r=`${e}:${t}`;_.has(r)||_.add(r)}},54034:(t,e,r)=>{function a(){let t=new Float32Array(128),e=0;for(let r=0;r<80;++r){if(r%5==0)continue;let a=2.39996323*r,s=Math.sqrt(r)/Math.sqrt(80);t[e++]=s*Math.cos(a),t[e++]=s*Math.sin(a)}return t}function s(t,e,r){return{focusDistance:r?t/2e3:(t+992)/2e3,focusRange:Math.max(e/2e3,1e-6)}}r.d(e,{a:()=>a,b:()=>s,c:()=>i});var i={focusDistance:0,focalLength:200,bokehScale:1}},80326:(t,e,r)=>{r.r(e);var a=r(54034),s=r(54029),i=r(13576),h=r(85975);r(50240);var o=new s.v,l=new h.Dc,u=[0,1,1,2],_=class extends s.a{constructor(t,e,r,a,i){super("vec4"),this._width=0,this._height=0,this._halfWidth=0,this._halfHeight=0,this._materials=[],this._inputColor=t,this._input=e,this._depth=r,this._params=a,this._opts=i,this._rtCoC=this._makeRT(1,1,"DoF.CoC","coc"),this._rtMasked=this._makeRT(1,1,"DoF.Masked.Far","color"),this._rtCoCBlurred=this._makeRT(1,1,"DoF.CoC.Blurred","coc"),this._rtBlurA=this._makeRT(1,1,"DoF.Blur.Target.A","blur"),this._rtBlurB=this._makeRT(1,1,"DoF.Blur.Target.B","blur"),this._rtIntermediate=this._makeRT(1,1,"DoF.Intermediate","color"),this._rtNear=this._makeRT(1,1,"DoF.Bokeh.Near","color"),this._rtFar=this._makeRT(1,1,"DoF.Bokeh.Far","color"),this._nearTexNode=(0,s.oc)(this._rtNear.texture),this._farTexNode=(0,s.oc)(this._rtFar.texture),this._cocBlurredTexNode=(0,s.oc)(this._rtCoCBlurred.texture),this._buildMaterials()}static get type(){return"SplineDepthOfFieldNode"}_makeRT(t,e,r,a){let i=new h.Kc(t,e,{minFilter:h.qa,magFilter:h.qa,depthBuffer:!1,type:"color"===a&&this._opts.halfFloat?h.Ba:void 0});return"coc"!==a&&i.texture.type!==h.Ba&&(0,s.Sc)()&&(i.texture.internalFormat="rgba8unorm-srgb"),i.texture.name=r,i}_buildMaterials(){for(let t of this._materials)t.dispose();this._materials=[];let t=(t,e)=>{let r=new s.c;return r.name=t,r.colorNode=e,r.depthTest=!1,r.depthWrite=!1,r.blending=h.m,r.needsUpdate=!0,r},{focusDistance:e,focusRange:r,bokehScale:i,cameraNear:o,cameraFar:l}=this._params,_=this._params.orthographic,n=this._input,d=this._depth,c=this._opts.inputUv??(t=>t),m=t=>t,p=1/Math.max(1,this._halfWidth),f=1/Math.max(1,this._halfHeight),B=(0,s.I)(()=>{let t=(0,s.yc)().toVar(),a=d.sample(t).toVar(),i=(0,s.Ic)((0,s.Fb)(a,o,l),o,l),h=(0,s.Ic)((0,s.Ab)(a,o,l),o,l),u=(0,s._b)(_.greaterThan(.5),h,i).sub(e).toVar(),n=(0,s.ec)((0,s.za)(0),r,(0,s.P)(u)).toVar();return(0,s.Dc)(n.mul((0,s.ic)(u,(0,s.za)(0))),n.mul((0,s.ic)((0,s.za)(0),u)),0,1)});this._materials.push(t("SplineDoF.coc",B()));let g=this._cocBlurSequence();for(let e=0;e<u.length;e++){let r=p*u[e]+.5*p,a=f*u[e]+.5*f,i=(0,s.oc)(g[e].from.texture),h=(0,s.I)(()=>{let t=(0,s.yc)();return i.sample(t.add((0,s.Bc)(-r,a))).add(i.sample(t.add((0,s.Bc)(r,a)))).add(i.sample(t.add((0,s.Bc)(r,-a)))).add(i.sample(t.add((0,s.Bc)(-r,-a)))).mul(.25)});this._materials.push(t(`SplineDoF.cocBlur${e}`,h()))}let F=(0,s.oc)(this._rtCoC.texture),T=(0,s.I)(()=>{let t=(0,s.yc)().toVar(),e=(0,s.ga)(F.sample(t).g.mul(i),0,1);return n.sample(c(t)).mul(e)});this._materials.push(t("SplineDoF.mask",T()));let C=(0,a.a)(),k=(e,r,a,h,o)=>t(e,(0,s.I)(()=>{let t=(0,s.yc)().toVar(),e=a.sample(t).toVar(),l=(h?e.r:e.g).mul(i).toVar(),u=(0,s.Dc)(0).toVar();return(0,s.J)(l.equal(0),()=>{u.assign(r.sample(o(t)))}).Else(()=>{let a=h?(0,s.eb)(l,e.g.mul(i)):l,_=(0,s.Bc)(p,f).mul(a).toVar(),n=(0,s.Dc)(0).toVar();for(let e=0;e<C.length;e+=2)n.addAssign(r.sample(o(t.add(_.mul((0,s.Bc)(C[e],C[e+1]))))));u.assign(n.div(64))}),u})()),D=(0,s.oc)(this._rtCoCBlurred.texture),x=(0,s.oc)(this._rtIntermediate.texture);this._materials.push(k("SplineDoF.farBase",(0,s.oc)(this._rtMasked.texture),F,!1,m),k("SplineDoF.farFill",x,F,!1,m),k("SplineDoF.nearBase",n,D,!0,c),k("SplineDoF.nearFill",x,D,!0,m))}_cocBlurSequence(){let t=[],e=this._rtCoC;for(let r=0;r<u.length-1;r++){let a=1&r?this._rtBlurB:this._rtBlurA;t.push({from:e,to:a}),e=a}return t.push({from:e,to:this._rtCoCBlurred}),t}renderDoF(t){t.getDrawingBufferSize(l);let e=Math.max(1,Math.round(l.x)),r=Math.max(1,Math.round(l.y));if(e!==this._width||r!==this._height){this._width=e,this._height=r,this._halfWidth=Math.max(1,Math.round(.5*e)),this._halfHeight=Math.max(1,Math.round(.5*r)),this._disposeTargets();let t=this._halfWidth,a=this._halfHeight;this._rtCoC=this._makeRT(e,r,"DoF.CoC","coc"),this._rtMasked=this._makeRT(e,r,"DoF.Masked.Far","color"),this._rtCoCBlurred=this._makeRT(t,a,"DoF.CoC.Blurred","coc"),this._rtBlurA=this._makeRT(t,a,"DoF.Blur.Target.A","blur"),this._rtBlurB=this._makeRT(t,a,"DoF.Blur.Target.B","blur"),this._rtIntermediate=this._makeRT(t,a,"DoF.Intermediate","color"),this._rtNear=this._makeRT(t,a,"DoF.Bokeh.Near","color"),this._rtFar=this._makeRT(t,a,"DoF.Bokeh.Far","color"),this._nearTexNode.value=this._rtNear.texture,this._farTexNode.value=this._rtFar.texture,this._cocBlurredTexNode.value=this._rtCoCBlurred.texture,this._buildMaterials()}let a=this._cocBlurSequence(),s=[this._rtCoC,...a.map(t=>t.to),this._rtMasked,this._rtIntermediate,this._rtFar,this._rtIntermediate,this._rtNear],i=t.getRenderTarget(),h=t.getMRT();t.setMRT(null);for(let e=0;e<s.length;e++)t.setRenderTarget(s[e]),o.material=this._materials[e],o.name=this._materials[e].name,o.render(t);t.setRenderTarget(i),t.setMRT(h)}setup(){let t=this._nearTexNode,e=this._farTexNode,r=(0,s.gb)(this._cocBlurredTexNode.r.mul(this._params.bokehScale),1),a=this._inputColor.mul(e.a.oneMinus()).add(e);return(0,s.hb)(a,t,r)}_disposeTargets(){this._rtCoC.dispose(),this._rtMasked.dispose(),this._rtCoCBlurred.dispose(),this._rtBlurA.dispose(),this._rtBlurB.dispose(),this._rtIntermediate.dispose(),this._rtNear.dispose(),this._rtFar.dispose()}dispose(){for(let t of this._materials)t.dispose();this._materials=[],this._disposeTargets()}};(0,i.d)("depthOfField",function(t,e,r,a,s){return new _(t,e,r,a,s)})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.