PageSourceSearch

https://auramrcomp-b3pjowqc.manus.space/assets/kernelBlur.fragment-6KL_RhP4.js

js auramrcomp-b3pjowqc.manus.space collected 2026-10-03 05:00:18 UTC 2,670 bytes, 57 lines download raw bytes

1import{S as e}from"./index-0LhFotdt.js";import"./kernelBlurVaryingDeclaration-DJ5kzBQs.js";import"./packingFunctions-DqUVTU4U.js";const t="kernelBlurFragment",l=`#ifdef DOF
2factor=sampleCoC(fragmentInputs.sampleCoord{X}); 
3computedWeight=KERNEL_WEIGHT{X}*factor;sumOfWeights+=computedWeight;
4#else
5computedWeight=KERNEL_WEIGHT{X};
6#endif
7#ifdef PACKEDFLOAT
8blend+=unpack(textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCoord{X}))*computedWeight;
9#else
10blend+=textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCoord{X})*computedWeight;
11#endif
12`;e.IncludesShadersStoreWGSL[t]||(e.IncludesShadersStoreWGSL[t]=l);const a="kernelBlurFragment2",m=`#ifdef DOF
13factor=sampleCoC(fragmentInputs.sampleCenter+uniforms.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(textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCenter+uniforms.delta*KERNEL_DEP_OFFSET{X}))*computedWeight;
19#else
20blend+=textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCenter+uniforms.delta*KERNEL_DEP_OFFSET{X})*computedWeight;
21#endif
22`;e.IncludesShadersStoreWGSL[a]||(e.IncludesShadersStoreWGSL[a]=m);const r="kernelBlurPixelShader",n=`var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;uniform delta: vec2f;varying sampleCenter: vec2f;
23#ifdef DOF
24var circleOfConfusionSamplerSampler: sampler;var circleOfConfusionSampler: texture_2d<f32>;fn sampleCoC(offset: vec2f)->f32 {var coc: f32=textureSample(circleOfConfusionSampler,circleOfConfusionSamplerSampler,offset).r;return coc; }
25#endif
26#include<kernelBlurVaryingDeclaration>[0..varyingCount]
27#ifdef PACKEDFLOAT
28#include<packingFunctions>
29#endif
30#define CUSTOM_FRAGMENT_DEFINITIONS
31@fragment
32fn main(input: FragmentInputs)->FragmentOutputs {var computedWeight: f32=0.0;
33#ifdef PACKEDFLOAT
34var blend: f32=0.;
35#else
36var blend: vec4f= vec4f(0.);
37#endif
38#ifdef DOF
39var sumOfWeights: f32=CENTER_WEIGHT; 
40var factor: f32=0.0;
41#ifdef PACKEDFLOAT
42blend+=unpack(textureSample(textureSampler,textureSamplerSampler,input.sampleCenter))*CENTER_WEIGHT;
43#else
44blend+=textureSample(textureSampler,textureSamplerSampler,input.sampleCenter)*CENTER_WEIGHT;
45#endif
46#endif
47#include<kernelBlurFragment>[0..varyingCount]
48#include<kernelBlurFragment2>[0..depCount]
49#ifdef PACKEDFLOAT
50fragmentOutputs.color=pack(blend);
51#else
52fragmentOutputs.color=blend;
53#endif
54#ifdef DOF
55fragmentOutputs.color/=sumOfWeights;
56#endif
57}`;e.ShadersStoreWGSL[r]||(e.ShadersStoreWGSL[r]=n);const d={name:r,shader:n};export{d as kernelBlurPixelShaderWGSL};

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.