PageSourceSearch

https://balloon99-kj7qgchv.manus.space/assets/depth.vertex-BYcK_DMi.js

js balloon99-kj7qgchv.manus.space collected 2026-10-03 05:01:53 UTC 2,279 bytes, 57 lines download raw bytes

1import{p as e}from"./fileTools.pure-O3hflNMy.js";import{b as a,a as n,c as o,i as s,d,e as f,f as u,g as c}from"./clipPlaneVertex-B5KC89fQ.js";import{m as l,a as p,b as v,c as x}from"./morphTargetsVertex-VF2XVHUB.js";const i="depthVertexShader",r=`attribute position: vec3f;
2#include<bonesDeclaration>
3#include<bakedVertexAnimationDeclaration>
4#include<morphTargetsVertexGlobalDeclaration>
5#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]
6#include<clipPlaneVertexDeclaration>
7#include<instancesDeclaration>
8uniform viewProjection: mat4x4f;uniform depthValues: vec2f;
9#if defined(ALPHATEST) || defined(NEED_UV)
10varying vUV: vec2f;uniform diffuseMatrix: mat4x4f;
11#ifdef UV1
12attribute uv: vec2f;
13#endif
14#ifdef UV2
15attribute uv2: vec2f;
16#endif
17#endif
18#ifdef STORE_CAMERASPACE_Z
19uniform view: mat4x4f;varying vViewPos: vec4f;
20#endif
21varying vDepthMetric: f32;
22#define CUSTOM_VERTEX_DEFINITIONS
23@vertex
24fn main(input : VertexInputs)->FragmentInputs {var positionUpdated: vec3f=vertexInputs.position;
25#ifdef UV1
26var uvUpdated: vec2f=vertexInputs.uv;
27#endif
28#ifdef UV2
29var uv2Updated: vec2f=vertexInputs.uv2;
30#endif
31#include<morphTargetsVertexGlobal>
32#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]
33#include<instancesVertex>
34#include<bonesVertex>
35#include<bakedVertexAnimation>
36var worldPos: vec4f=finalWorld* vec4f(positionUpdated,1.0);
37#include<clipPlaneVertex>
38vertexOutputs.position=uniforms.viewProjection*worldPos;
39#ifdef STORE_CAMERASPACE_Z
40vertexOutputs.vViewPos=uniforms.view*worldPos;
41#else
42#ifdef USE_REVERSE_DEPTHBUFFER
43vertexOutputs.vDepthMetric=((-vertexOutputs.position.z+uniforms.depthValues.x)/(uniforms.depthValues.y));
44#else
45vertexOutputs.vDepthMetric=((vertexOutputs.position.z+uniforms.depthValues.x)/(uniforms.depthValues.y));
46#endif
47#endif
48#if defined(ALPHATEST) || defined(BASIC_RENDER)
49#ifdef UV1
50vertexOutputs.vUV= (uniforms.diffuseMatrix* vec4f(uvUpdated,1.0,0.0)).xy;
51#endif
52#ifdef UV2
53vertexOutputs.vUV= (uniforms.diffuseMatrix* vec4f(uv2Updated,1.0,0.0)).xy;
54#endif
55#endif
56}
57`;e.ShadersStoreWGSL[i]||(e.ShadersStoreWGSL[i]=r);const m=[a,n,l,p,o,s,v,x,d,f,u,c];for(const t of m)e.IncludesShadersStoreWGSL[t.name]||(e.IncludesShadersStoreWGSL[t.name]=t.shader);const E={name:i,shader:r};export{E as depthVertexShaderWGSL};

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.