1import{p as e}from"./fileTools.pure-O3hflNMy.js";import{k as i}from"./kernelBlurVaryingDeclaration-GDYaakir.js";import{p as s}from"./packingFunctions-CE1qvGjZ.js";const t="kernelBlurFragment",a=`#ifdef DOF 2factor=sampleCoC(sampleCoord{X}); 3computedWeight=KERNEL_WEIGHT{X}*factor;sumOfWeights+=computedWeight; 4#else 5computedWeight=KERNEL_WEIGHT{X}; 6#endif 7#ifdef PACKEDFLOAT 8blend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight; 9#else 10blend+=texture2D(textureSampler,sampleCoord{X})*computedWeight; 11#endif 12`;e.IncludesShadersStore[t]||(e.IncludesShadersStore[t]=a);const f={name:t,shader:a},n="kernelBlurFragment2",o=`#ifdef DOF 13factor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X});computedWeight=KERNEL_DEP_WEIGHT{X}*factor;sumOfWeights+=computedWeight; 14#else 15computedWeight=KERNEL_DEP_WEIGHT{X}; 16#endif 17#ifdef PACKEDFLOAT 18blend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight; 19#else 20blend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight; 21#endif 22`;e.IncludesShadersStore[n]||(e.IncludesShadersStore[n]=o);const u={name:n,shader:o},l="kernelBlurPixelShader",d=`uniform sampler2D textureSampler;uniform vec2 delta;varying vec2 sampleCenter; 23#ifdef DOF 24uniform sampler2D circleOfConfusionSampler;float sampleCoC(in vec2 offset) {float coc=texture2D(circleOfConfusionSampler,offset).r;return coc; } 25#endif 26#include<kernelBlurVaryingDeclaration>[0..varyingCount] 27#ifdef PACKEDFLOAT 28#include<packingFunctions> 29#endif 30#define CUSTOM_FRAGMENT_DEFINITIONS 31void main(void) 32{float computedWeight=0.0; 33#ifdef PACKEDFLOAT 34float blend=0.; 35#else 36vec4 blend=vec4(0.); 37#endif 38#ifdef DOF 39float sumOfWeights=CENTER_WEIGHT; 40float factor=0.0; 41#ifdef PACKEDFLOAT 42blend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT; 43#else 44blend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT; 45#endif 46#endif 47#include<kernelBlurFragment>[0..varyingCount] 48#include<kernelBlurFragment2>[0..depCount] 49#ifdef PACKEDFLOAT 50gl_FragColor=pack(blend); 51#else 52gl_FragColor=blend; 53#endif 54#ifdef DOF 55gl_FragColor/=sumOfWeights; 56#endif 57}`;e.ShadersStore[l]||(e.ShadersStore[l]=d);const c=[i,s,f,u];for(const r of c)e.IncludesShadersStore[r.name]||(e.IncludesShadersStore[r.name]=r.shader);const g={name:l,shader:d};export{g as kernelBlurPixelShader};
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.