1import{S as e}from"./index-B2RPBpOK.js";import{s as C,m as X,d as F,a as G,l as W}from"./logDepthDeclaration-7GnhX62X.js";import{h as H}from"./helperFunctions-Dn2IugJI.js";import{b,a as B,i as w,c as y,d as Y,e as $,f as z,g as j}from"./clipPlaneVertex-Bi9W2ZdP.js";import{f as k,a as Q,v as Z}from"./vertexColorMixing-DD-evSWG.js";import{m as K,a as q,b as J,c as ee}from"./morphTargetsVertex-CCaps0nY.js";const n="decalVertexDeclaration",_=`#ifdef DECAL 2uniform vec4 vDecalInfos;uniform mat4 decalMatrix; 3#endif 4`;e.IncludesShadersStore[n]||(e.IncludesShadersStore[n]=_);const ie={name:n,shader:_},t="defaultVertexDeclaration",u=`uniform mat4 viewProjection; 5#ifdef MULTIVIEW 6mat4 viewProjectionR; 7#endif 8uniform mat4 view; 9#ifdef DIFFUSE 10uniform mat4 diffuseMatrix;uniform vec2 vDiffuseInfos; 11#endif 12#ifdef AMBIENT 13uniform mat4 ambientMatrix;uniform vec2 vAmbientInfos; 14#endif 15#ifdef OPACITY 16uniform mat4 opacityMatrix;uniform vec2 vOpacityInfos; 17#endif 18#ifdef EMISSIVE 19uniform vec2 vEmissiveInfos;uniform mat4 emissiveMatrix; 20#endif 21#ifdef LIGHTMAP 22uniform vec2 vLightmapInfos;uniform mat4 lightmapMatrix; 23#endif 24#if defined(SPECULAR) && defined(SPECULARTERM) 25uniform vec2 vSpecularInfos;uniform mat4 specularMatrix; 26#endif 27#ifdef BUMP 28uniform vec3 vBumpInfos;uniform mat4 bumpMatrix; 29#endif 30#ifdef REFLECTION 31uniform mat4 reflectionMatrix; 32#endif 33#ifdef POINTSIZE 34uniform float pointSize; 35#endif 36#ifdef DETAIL 37uniform vec4 vDetailInfos;uniform mat4 detailMatrix; 38#endif 39uniform vec4 cameraInfo;uniform vec4 vTextureRepetitionHexTilingParams; 40#include<decalVertexDeclaration> 41#define ADDITIONAL_VERTEX_DECLARATION 42`;e.IncludesShadersStore[t]||(e.IncludesShadersStore[t]=u);const ne={name:t,shader:u},a="uvAttributeDeclaration",S=`#ifdef UV{X} 43attribute vec2 uv{X}; 44#endif 45`;e.IncludesShadersStore[a]||(e.IncludesShadersStore[a]=S);const te={name:a,shader:S},r="prePassVertexDeclaration",M=`#ifdef PREPASS 46#ifdef PREPASS_LOCAL_POSITION 47varying vec3 vPosition; 48#endif 49#ifdef PREPASS_DEPTH 50varying vec3 vViewPos; 51#endif 52#ifdef PREPASS_NORMALIZED_VIEW_DEPTH 53varying float vNormViewDepth; 54#endif 55#if defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) 56uniform mat4 previousViewProjection;varying vec4 vCurrentPosition;varying vec4 vPreviousPosition; 57#endif 58#endif 59`;e.IncludesShadersStore[r]||(e.IncludesShadersStore[r]=M);const ae={name:r,shader:M},d="samplerVertexDeclaration",V=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0 60varying vec2 v_VARYINGNAME_UV; 61#endif 62`;e.IncludesShadersStore[d]||(e.IncludesShadersStore[d]=V);const re={name:d,shader:V},o="bumpVertexDeclaration",h=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) 63#if defined(TANGENT) && defined(NORMAL) 64varying mat3 vTBN; 65#endif 66#endif 67`;e.IncludesShadersStore[o]||(e.IncludesShadersStore[o]=h);const de={name:o,shader:h},f="lightVxFragmentDeclaration",D=`#ifdef LIGHT{X} 68uniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X}; 69#ifdef SPECULARTERM 70uniform vec4 vLightSpecular{X}; 71#else 72vec4 vLightSpecular{X}=vec4(0.); 73#endif 74#ifdef SHADOW{X} 75#ifdef SHADOWCSM{X} 76uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X}; 77#elif defined(SHADOWCUBE{X}) 78#else 79varying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X}; 80#endif 81uniform vec4 shadowsInfo{X};uniform vec2 depthValues{X}; 82#endif 83#ifdef SPOTLIGHT{X} 84uniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X}; 85#elif defined(POINTLIGHT{X}) 86uniform vec4 vLightFalloff{X}; 87#elif defined(HEMILIGHT{X}) 88uniform vec3 vLightGround{X}; 89#endif 90#if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED) 91uniform vec4 vLightWidth{X};uniform vec4 vLightHeight{X}; 92#endif 93#endif 94`;e.IncludesShadersStore[f]||(e.IncludesShadersStore[f]=D);const oe={name:f,shader:D},s="lightVxUboDeclaration",p=`#ifdef LIGHT{X} 95uniform Light{X} 96{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular; 97#ifdef SPOTLIGHT{X} 98vec4 vLightDirection;vec4 vLightFalloff; 99#elif defined(POINTLIGHT{X}) 100vec4 vLightFalloff;
101#elif defined(HEMILIGHT{X}) 102vec3 vLightGround; 103#elif defined(CLUSTLIGHT{X}) 104vec2 vSliceData;vec2 vSliceRanges[CLUSTLIGHT_SLICES]; 105#endif 106#if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED) 107vec4 vLightWidth;vec4 vLightHeight; 108#endif 109vec4 shadowsInfo;vec2 depthValues;} light{X}; 110#ifdef SHADOW{X} 111#ifdef SHADOWCSM{X} 112uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X}; 113#elif defined(SHADOWCUBE{X}) 114#else 115varying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X}; 116#endif 117#endif 118#endif 119`;e.IncludesShadersStore[s]||(e.IncludesShadersStore[s]=p);const fe={name:s,shader:p},l="prePassVertex",P=`#ifdef PREPASS_DEPTH 120vViewPos=(view*worldPos).rgb; 121#endif 122#ifdef PREPASS_NORMALIZED_VIEW_DEPTH 123vNormViewDepth=((view*worldPos).z-cameraInfo.x)/(cameraInfo.y-cameraInfo.x); 124#endif 125#ifdef PREPASS_LOCAL_POSITION 126vPosition=positionUpdated.xyz; 127#endif 128#if (defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && defined(BONES_VELOCITY_ENABLED) 129vCurrentPosition=viewProjection*worldPos; 130#if NUM_BONE_INFLUENCERS>0 131mat4 previousInfluence;previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0]; 132#if NUM_BONE_INFLUENCERS>1 133previousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1]; 134#endif 135#if NUM_BONE_INFLUENCERS>2 136previousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2]; 137#endif 138#if NUM_BONE_INFLUENCERS>3 139previousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3]; 140#endif 141#if NUM_BONE_INFLUENCERS>4 142previousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; 143#endif 144#if NUM_BONE_INFLUENCERS>5 145previousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; 146#endif 147#if NUM_BONE_INFLUENCERS>6 148previousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; 149#endif 150#if NUM_BONE_INFLUENCERS>7 151previousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; 152#endif 153vPreviousPosition=previousViewProjection*finalPreviousWorld*previousInfluence*vec4(positionUpdated,1.0); 154#else 155vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0); 156#endif 157#endif 158`;e.IncludesShadersStore[l]||(e.IncludesShadersStore[l]=P);const se={name:l,shader:P},c="uvVariableDeclaration",T=`#if !defined(UV{X}) && defined(MAINUV{X}) 159vec2 uv{X}=vec2(0.,0.); 160#endif 161#ifdef MAINUV{X} 162vMainUV{X}=uv{X}; 163#endif 164`;e.IncludesShadersStore[c]||(e.IncludesShadersStore[c]=T);const le={name:c,shader:T},E="samplerVertexImplementation",R=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0 165if (v_INFONAME_==0.) 166{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uvUpdated,1.0,0.0));} 167#ifdef UV2 168else if (v_INFONAME_==1.) 169{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv2Updated,1.0,0.0));} 170#endif 171#ifdef UV3 172else if (v_INFONAME_==2.) 173{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv3,1.0,0.0));} 174#endif 175#ifdef UV4 176else if (v_INFONAME_==3.) 177{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv4,1.0,0.0));} 178#endif 179#ifdef UV5 180else if (v_INFONAME_==4.) 181{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv5,1.0,0.0));} 182#endif 183#ifdef UV6 184else if (v_INFONAME_==5.) 185{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv6,1.0,0.0));} 186#endif 187#endif 188`;e.IncludesShadersStore[E]||(e.IncludesShadersStore[E]=R);const ce={name:E,shader:R},v="bumpVertex",g=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) 189#if defined(TANGENT) && defined(NORMAL) 190vec3 tbnNormal=normalize(normalUpdated);vec3 tbnTangent=normalize(tangentUpdated.xyz);vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal); 191#endif 192#endif 193`;e.IncludesShadersStore[v]||(e.IncludesShadersStore[v]=g);const Ee={name:v,shader:g},m="shadowsVertex",U=`#ifdef SHADOWS 194#if defined(SHADOWCSM{X}) 195vPositionFromCamera{X}=view*worldPos;for (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) {vPositionFromLight{X}[i]=lightMatrix{X}[i]*worldPos; 196#ifdef USE_REVERSE_DEPTHBUFFER 197vDepthMetric{X}[i]=(-vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y; 198#else 199vDepthMetric{X}[i]=(vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y; 200#endif 201} 202#elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X}) 203vPositionFromLight{X}=lightMatrix{X}*worldPos; 204#ifdef USE_REVERSE_DEPTHBUFFER 205vDepthMetric{X}=(-vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y; 206#else 207vDepthMetric{X}=(vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y; 208#endif 209#endif 210#endif 211`;e.IncludesShadersStore[m]||(e.IncludesShadersStore[m]=U);const ve={name:m,shader:U},I="pointCloudVertex",L=`#if defined(POINTSIZE) && !defined(WEBGPU) 212gl_PointSize=pointSize; 213#endif 214`;e.IncludesShadersStore[I]||(e.IncludesShadersStore[I]=L);const me={name:I,shader:L},A="logDepthVertex",x=`#ifdef LOGARITHMICDEPTH 215vFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant; 216#endif 217`;e.IncludesShadersStore[A]||(e.IncludesShadersStore[A]=x);const Ie={name:A,shader:x},N="defaultVertexShader",O=`#define CUSTOM_VERTEX_EXTENSION 218#include<__decl__defaultVertex> 219#define CUSTOM_VERTEX_BEGIN 220attribute vec3 position; 221#ifdef NORMAL 222attribute vec3 normal; 223#endif 224#ifdef TANGENT 225attribute vec4 tangent; 226#endif 227#ifdef UV1 228attribute vec2 uv; 229#endif 230#include<uvAttributeDeclaration>[2..7] 231#ifdef VERTEXCOLOR 232attribute vec4 color; 233#endif 234#include<helperFunctions> 235#include<bonesDeclaration> 236#include<bakedVertexAnimationDeclaration> 237#include<instancesDeclaration> 238#include<prePassVertexDeclaration> 239#include<mainUVVaryingDeclaration>
239[1..7] 240#include<samplerVertexDeclaration>(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse) 241#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail) 242#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient) 243#include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity) 244#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive) 245#include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap) 246#if defined(SPECULARTERM) 247#include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular) 248#endif 249#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump) 250#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal) 251varying vec3 vPositionW; 252#ifdef NORMAL 253varying vec3 vNormalW; 254#endif 255#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES) 256varying vec4 vColor; 257#endif 258#include<bumpVertexDeclaration> 259#include<clipPlaneVertexDeclaration> 260#include<fogVertexDeclaration> 261#include<__decl__lightVxFragment>[0..maxSimultaneousLights] 262#include<morphTargetsVertexGlobalDeclaration> 263#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets] 264#ifdef REFLECTIONMAP_SKYBOX 265varying vec3 vPositionUVW; 266#endif 267#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) 268varying vec3 vDirectionW; 269#endif 270#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0 271varying float vViewDepth; 272#endif 273#include<logDepthDeclaration> 274#define CUSTOM_VERTEX_DEFINITIONS 275void main(void) { 276#define CUSTOM_VERTEX_MAIN_BEGIN 277vec3 positionUpdated=position; 278#ifdef NORMAL 279vec3 normalUpdated=normal; 280#endif 281#ifdef TANGENT 282vec4 tangentUpdated=tangent; 283#endif 284#ifdef UV1 285vec2 uvUpdated=uv; 286#endif 287#ifdef UV2 288vec2 uv2Updated=uv2; 289#endif 290#ifdef VERTEXCOLOR 291vec4 colorUpdated=color; 292#endif 293#include<morphTargetsVertexGlobal> 294#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets] 295#ifdef REFLECTIONMAP_SKYBOX 296vPositionUVW=positionUpdated; 297#endif 298#define CUSTOM_VERTEX_UPDATE_POSITION 299#define CUSTOM_VERTEX_UPDATE_NORMAL 300#include<instancesVertex> 301#if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED) 302vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0); 303#endif 304#include<bonesVertex> 305#include<bakedVertexAnimation> 306vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); 307#ifdef NORMAL 308mat3 normalWorld=mat3(finalWorld); 309#if defined(INSTANCES) && defined(THIN_INSTANCES) 310vNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vNormalW=normalize(normalWorld*vNormalW); 311#else 312#ifdef NONUNIFORMSCALING 313normalWorld=transposeMat3(inverseMat3(normalWorld)); 314#endif 315vNormalW=normalize(normalWorld*normalUpdated); 316#endif 317#endif 318#define CUSTOM_VERTEX_UPDATE_WORLDPOS 319#ifdef MULTIVIEW 320if (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;} 321#else 322gl_Position=viewProjection*worldPos; 323#endif 324vPositionW=vec3(worldPos); 325#ifdef PREPASS 326#include<prePassVertex> 327#endif 328#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) 329vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0))); 330#endif 331#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0 332#ifdef RIGHT_HANDED 333vViewDepth=-(view*worldPos).z; 334#else 335vViewDepth=(view*worldPos).z; 336#endif 337#endif 338#ifndef UV1 339vec2 uvUpdated=vec2(0.,0.); 340#endif 341#ifndef UV2 342vec2 uv2Updated=vec2(0.,0.); 343#endif 344#ifdef MAINUV1 345vMainUV1=uvUpdated; 346#endif 347#ifdef MAINUV2 348vMainUV2=uv2Updated; 349#endif 350#include<uvVariableDeclaration>[3..7] 351#include<samplerVertexImplementation>(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse,_MATRIXNAME_,diffuse,_INFONAME_,DiffuseInfos.x) 352#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x) 353#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x) 354#include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x) 355#include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x) 356#include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x) 357#if defined(SPECULARTERM) 358#include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular,_MATRIXNAME_,specular,_INFONAME_,SpecularInfos.x) 359#endif 360#include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x) 361#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x) 362#include<bumpVertex> 363#include<clipPlaneVertex> 364#include<fogVertex> 365#include<shadowsVertex>[0..maxSimultaneousLights] 366#include<vertexColorMixing> 367#include<pointCloudVertex> 368#include<logDepthVertex> 369#define CUSTOM_VERTEX_MAIN_END 370} 371`;e.ShadersStore[N]||(e.ShadersStore[N]=O);const Ae=[ie,ne,C,X,F,te,H,b,B,w,ae,G,re,de,y,k,oe,fe,K,q,W,J,ee,Y,$,z,se,le,ce,Ee,j,Q,ve,Z,me,Ie];for(const i of Ae)e.IncludesShadersStore[i.name]||(e.IncludesShadersStore[i.name]=i.shader);const he={name:N,shader:O};export{he as defaultVertexShader};
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.