PageSourceSearch

https://balloon99-kj7qgchv.manus.space/assets/depth.fragment-DlSrnZth.js

js balloon99-kj7qgchv.manus.space collected 2026-10-03 05:01:56 UTC 1,410 bytes, 40 lines download raw bytes

1import{p as e}from"./fileTools.pure-O3hflNMy.js";import{c as r,a}from"./clipPlaneFragment-DpbE3SOa.js";import{p as f}from"./packingFunctions-VuxfsKiI.js";const t="depthPixelShader",n=`#ifdef ALPHATEST
2varying vUV: vec2f;var diffuseSamplerSampler: sampler;var diffuseSampler: texture_2d<f32>;
3#endif
4#include<clipPlaneFragmentDeclaration>
5varying vDepthMetric: f32;
6#ifdef PACKED
7#include<packingFunctions>
8#endif
9#ifdef STORE_CAMERASPACE_Z
10varying vViewPos: vec4f;
11#endif
12#define CUSTOM_FRAGMENT_DEFINITIONS
13@fragment
14fn main(input: FragmentInputs)->FragmentOutputs {
15#include<clipPlaneFragment>
16#ifdef ALPHATEST
17if (textureSample(diffuseSampler,diffuseSamplerSampler,input.vUV).a<0.4) {discard;}
18#endif
19#ifdef STORE_CAMERASPACE_Z
20#ifdef PACKED
21fragmentOutputs.color=pack(input.vViewPos.z);
22#else
23fragmentOutputs.color= vec4f(input.vViewPos.z,0.0,0.0,1.0);
24#endif
25#else
26#ifdef NONLINEARDEPTH
27#ifdef PACKED
28fragmentOutputs.color=pack(input.position.z);
29#else
30fragmentOutputs.color= vec4f(input.position.z,0.0,0.0,0.0);
31#endif
32#else
33#ifdef PACKED
34fragmentOutputs.color=pack(input.vDepthMetric);
35#else
36fragmentOutputs.color= vec4f(input.vDepthMetric,0.0,0.0,1.0);
37#endif
38#endif
39#endif
40}`;e.ShadersStoreWGSL[t]||(e.ShadersStoreWGSL[t]=n);const p=[r,f,a];for(const i of p)e.IncludesShadersStoreWGSL[i.name]||(e.IncludesShadersStoreWGSL[i.name]=i.shader);const c={name:t,shader:n};export{c as depthPixelShaderWGSL};

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.