1import{i as e}from"./decorators.serialization-C7d7ykGG.js";import"./defaultUboDeclaration-BqLi0jLJ.js";import"./shadowsVertex-W9Tk-KEX.js";import"./helperFunctions-BABR42FV.js";import"./vertexColorMixing-CgTbWJSl.js";import"./mainUVVaryingDeclaration-YQtIvosf.js";import"./bumpVertex-y3qwldQE.js";import"./fogVertex-C2jSPOsq.js";import"./logDepthDeclaration-BahBC74I.js";import"./logDepthVertex-gbg7kMkf.js";import"./math.vector-C1xyPDEl.js";import"./math.scalar.functions-DkeaWAWz.js";import"./bufferUtils-DTRdUD8L.js";import"./math.color-CzLaKyb6.js";const t="lightVxFragmentDeclaration",r=`#ifdef LIGHT{X} 2uniform vLightData{X}: vec4f;uniform vLightDiffuse{X}: vec4f; 3#ifdef SPECULARTERM 4uniform vLightSpecular{X}: vec4f; 5#else 6var vLightSpecular{X}: vec4f= vec4f(0.); 7#endif 8#ifdef SHADOW{X} 9#ifdef SHADOWCSM{X} 10uniform lightMatrix{X}: mat4x4f[SHADOWCSMNUM_CASCADES{X}];varying var vPositionFromLight{X}: vec4f[SHADOWCSMNUM_CASCADES{X}];varying var vDepthMetric{X}: f32[SHADOWCSMNUM_CASCADES{X}];varying var vPositionFromCamera{X}: vec4f; 11#elif defined(SHADOWCUBE{X}) 12#else 13varying var vPositionFromLight{X}: vec4f;varying var vDepthMetric{X}: f32;uniform lightMatrix{X}: mat4x4f; 14#endif 15uniform shadowsInfo{X}: vec4f;uniform depthValues{X}: vec2f; 16#endif 17#ifdef SPOTLIGHT{X} 18uniform vLightDirection{X}: vec4f;uniform vLightFalloff{X}: vec4f; 19#elif defined(POINTLIGHT{X}) 20uniform vLightFalloff{X}: vec4f; 21#elif defined(HEMILIGHT{X}) 22uniform vLightGround{X}: vec3f; 23#endif 24#if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED) 25uniform vLightWidth{X}: vec4f;uniform vLightHeight{X}: vec4f; 26#endif 27#endif 28`;e.IncludesShadersStoreWGSL[t]||(e.IncludesShadersStoreWGSL[t]=r);const i="defaultVertexShader",n=`#include<defaultUboDeclaration> 29#define CUSTOM_VERTEX_BEGIN 30attribute position: vec3f; 31#ifdef NORMAL 32attribute normal: vec3f; 33#endif 34#ifdef TANGENT 35attribute tangent: vec4f; 36#endif 37#ifdef UV1 38attribute uv: vec2f; 39#endif 40#include<uvAttributeDeclaration>[2..7] 41#ifdef VERTEXCOLOR 42attribute color: vec4f; 43#endif 44#include<helperFunctions> 45#include<bonesDeclaration> 46#include<bakedVertexAnimationDeclaration> 47#include<instancesDeclaration> 48#include<prePassVertexDeclaration> 49#include<mainUVVaryingDeclaration>[1..7] 50#include<samplerVertexDeclaration>(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse) 51#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail) 52#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient) 53#include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity) 54#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive) 55#include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap) 56#if defined(SPECULARTERM) 57#include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular) 58#endif 59#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump) 60#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal) 61varying vPositionW: vec3f; 62#ifdef NORMAL 63varying vNormalW: vec3f; 64#endif 65#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES) 66varying vColor: vec4f; 67#endif 68#include<bumpVertexDeclaration> 69#include<clipPlaneVertexDeclaration> 70#include<fogVertexDeclaration> 71#include<__decl__lightVxFragment>[0..maxSimultaneousLights] 72#include<morphTargetsVertexGlobalDeclaration> 73#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets] 74#ifdef REFLECTIONMAP_SKYBOX 75varying vPositionUVW: vec3f; 76#endif 77#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) 78varying vDirectionW: vec3f; 79#endif 80#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0 81varying vViewDepth: f32; 82#endif 83#include<logDepthDeclaration> 84#define CUSTOM_VERTEX_DEFINITIONS 85@vertex 86fn main(input : VertexInputs)->FragmentInputs { 87#define CUSTOM_VERTEX_MAIN_BEGIN 88var positionUpdated: vec3f=vertexInputs.position; 89#ifdef NORMAL 90var normalUpdated: vec3f=vertexInputs.normal; 91#endif 92#ifdef TANGENT 93var tangentUpdated: vec4f=vertexInputs.tangent; 94#endif 95#ifdef UV1 96var uvUpdated: vec2f=vertexInputs.uv; 97#endif 98#ifdef UV2 99var uv2Updated: vec2f=vertexInputs.uv2; 100#endif 101#ifdef VERTEXCOLOR 102var colorUpdated: vec4f=vertexInputs.color; 103#endif 104#include<morphTargetsVertexGlobal> 105#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets] 106#ifdef REFLECTIONMAP_SKYBOX 107vertexOutputs.vPositionUVW=positionUpdated; 108#endif 109#define CUSTOM_VERTEX_UPDATE_POSITION 110#define CUSTOM_VERTEX_UPDATE_NORMAL 111#include<instancesVertex> 112#if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED) 113vertexOutputs.vCurrentPosition=scene.viewProjection*finalWorld*vec4f(positionUpdated,
1131.0);vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*vec4f(positionUpdated,1.0); 114#endif 115#include<bonesVertex> 116#include<bakedVertexAnimation> 117var worldPos: vec4f=finalWorld*vec4f(positionUpdated,1.0); 118#ifdef NORMAL 119var normalWorld: mat3x3f= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz); 120#if defined(INSTANCES) && defined(THIN_INSTANCES) 121vertexOutputs.vNormalW=normalUpdated/ vec3f(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vertexOutputs.vNormalW=normalize(normalWorld*vertexOutputs.vNormalW); 122#else 123#ifdef NONUNIFORMSCALING 124normalWorld=transposeMat3(inverseMat3(normalWorld)); 125#endif 126vertexOutputs.vNormalW=normalize(normalWorld*normalUpdated); 127#endif 128#endif 129#define CUSTOM_VERTEX_UPDATE_WORLDPOS 130#ifdef MULTIVIEW 131if (gl_ViewID_OVR==0u) {vertexOutputs.position=scene.viewProjection*worldPos;} else {vertexOutputs.position=scene.viewProjectionR*worldPos;} 132#else 133vertexOutputs.position=scene.viewProjection*worldPos; 134#endif 135vertexOutputs.vPositionW= worldPos.xyz; 136#ifdef PREPASS 137#include<prePassVertex> 138#endif 139#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) 140vertexOutputs.vDirectionW=normalize((finalWorld* vec4f(positionUpdated,0.0)).xyz); 141#endif 142#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0 143#ifdef RIGHT_HANDED 144vertexOutputs.vViewDepth=-(scene.view*worldPos).z; 145#else 146vertexOutputs.vViewDepth=(scene.view*worldPos).z; 147#endif 148#endif 149#ifndef UV1 150var uvUpdated: vec2f=vec2f(0.,0.); 151#endif 152#ifdef MAINUV1 153vertexOutputs.vMainUV1=uvUpdated; 154#endif 155#ifndef UV2 156var uv2Updated: vec2f=vec2f(0.,0.); 157#endif 158#ifdef MAINUV2 159vertexOutputs.vMainUV2=uv2Updated; 160#endif 161#include<uvVariableDeclaration>[3..7] 162#include<samplerVertexImplementation>(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse,_MATRIXNAME_,diffuse,_INFONAME_,DiffuseInfos.x) 163#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x) 164#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x) 165#include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x) 166#include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x) 167#include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x) 168#if defined(SPECULARTERM) 169#include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular,_MATRIXNAME_,specular,_INFONAME_,SpecularInfos.x) 170#endif 171#include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x) 172#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x) 173#include<bumpVertex> 174#include<clipPlaneVertex> 175#include<fogVertex> 176#include<shadowsVertex>[0..maxSimultaneousLights] 177#include<vertexColorMixing> 178#include<logDepthVertex> 179#define CUSTOM_VERTEX_MAIN_END 180} 181`;e.ShadersStoreWGSL[i]||(e.ShadersStoreWGSL[i]=n);const m={name:i,shader:n};export{m as defaultVertexShaderWGSL};
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.