PageSourceSearch

https://auramrcomp-b3pjowqc.manus.space/assets/depth.vertex-BxJAezBI.js

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

1import{S as t}from"./index-0LhFotdt.js";import"./clipPlaneVertex-CyyoJefB.js";import"./morphTargetsVertex-CkfZwDjY.js";import"./instancesDeclaration-D1MAOQHs.js";const e="depthVertexShader",i=`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=input.position;
25#ifdef UV1
26var uvUpdated: vec2f=input.uv;
27#endif
28#ifdef UV2
29var uv2Updated: vec2f=input.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`;t.ShadersStoreWGSL[e]||(t.ShadersStoreWGSL[e]=i);const o={name:e,shader:i};export{o 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.