@uptimizr/dashboard 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +76 -0
  3. package/out/404.html +1 -0
  4. package/out/__next.__PAGE__.txt +9 -0
  5. package/out/__next._full.txt +20 -0
  6. package/out/__next._head.txt +6 -0
  7. package/out/__next._index.txt +5 -0
  8. package/out/__next._tree.txt +4 -0
  9. package/out/_next/static/93W3szqylNKDg-afLRmVW/_buildManifest.js +11 -0
  10. package/out/_next/static/93W3szqylNKDg-afLRmVW/_clientMiddlewareManifest.js +1 -0
  11. package/out/_next/static/93W3szqylNKDg-afLRmVW/_ssgManifest.js +1 -0
  12. package/out/_next/static/chunks/0-2y-_oomza2l.js +87 -0
  13. package/out/_next/static/chunks/00k_j_r7bv_eb.js +266 -0
  14. package/out/_next/static/chunks/00zdau6mcqeae.js +1 -0
  15. package/out/_next/static/chunks/023axeoslq39i.js +1 -0
  16. package/out/_next/static/chunks/068j6934u8j16.js +1 -0
  17. package/out/_next/static/chunks/0_rf76jneiwal.js +176 -0
  18. package/out/_next/static/chunks/0aznt7717miff.js +1 -0
  19. package/out/_next/static/chunks/0cu-q5q3a7uf3.js +1 -0
  20. package/out/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  21. package/out/_next/static/chunks/0dm32-jq30tg8.js +1 -0
  22. package/out/_next/static/chunks/0dn0yx0rn6mpf.js +1 -0
  23. package/out/_next/static/chunks/0flc7nppbmsl1.js +3 -0
  24. package/out/_next/static/chunks/0fskcfh9vbhtv.js +1 -0
  25. package/out/_next/static/chunks/0gv7mblzv3dl3.js +87 -0
  26. package/out/_next/static/chunks/0impkpmxx3ttp.js +1 -0
  27. package/out/_next/static/chunks/0jmn7u31w95ly.js +91 -0
  28. package/out/_next/static/chunks/0n8n481szj90g.js +1 -0
  29. package/out/_next/static/chunks/0o6ayai0s01js.js +1 -0
  30. package/out/_next/static/chunks/0rys92_73hdb0.js +22 -0
  31. package/out/_next/static/chunks/0tl_moiyi2txt.js +1 -0
  32. package/out/_next/static/chunks/0tx1j_ghpz7rc.css +3 -0
  33. package/out/_next/static/chunks/0ufbyo1x3qkmo.js +1 -0
  34. package/out/_next/static/chunks/0v82oqyoy9zol.js +1 -0
  35. package/out/_next/static/chunks/0wrm9jr-9bw0e.js +1893 -0
  36. package/out/_next/static/chunks/0wwcfw8i3j_zx.js +1 -0
  37. package/out/_next/static/chunks/0ys9-ozuluawt.js +1 -0
  38. package/out/_next/static/chunks/1-61zh4waha61.js +1 -0
  39. package/out/_next/static/chunks/10r_824wzt8hj.js +1 -0
  40. package/out/_next/static/chunks/112hws17nz665.js +7 -0
  41. package/out/_next/static/chunks/123xxske5c9na.js +1 -0
  42. package/out/_next/static/chunks/13isnf0--pmx1.js +1 -0
  43. package/out/_next/static/chunks/157d9euci08yu.js +1 -0
  44. package/out/_next/static/chunks/15s7425ffrec9.js +3 -0
  45. package/out/_next/static/chunks/163fa70v4mgxj.js +1 -0
  46. package/out/_next/static/chunks/17q0c2h5ui10r.js +4 -0
  47. package/out/_next/static/chunks/18u58lorfahxi.js +4 -0
  48. package/out/_next/static/chunks/1_aahautsz2v_.js +1 -0
  49. package/out/_next/static/chunks/1a9l89j7e6mqu.js +23 -0
  50. package/out/_next/static/chunks/1dsy2ngmfflis.js +123 -0
  51. package/out/_next/static/chunks/1flb8adpj6_2o.js +62 -0
  52. package/out/_next/static/chunks/1lsg-22yob8dx.js +1 -0
  53. package/out/_next/static/chunks/1nj82er7msdto.js +2 -0
  54. package/out/_next/static/chunks/1o1d0p-v1z8ty.js +1 -0
  55. package/out/_next/static/chunks/1pdep2_c530sg.js +1 -0
  56. package/out/_next/static/chunks/1thjncpj7u6pq.js +1 -0
  57. package/out/_next/static/chunks/1vdjn0pkoyypn.js +1 -0
  58. package/out/_next/static/chunks/1yehxf-fmeicg.js +1 -0
  59. package/out/_next/static/chunks/1zvc1tv--w8nn.js +1 -0
  60. package/out/_next/static/chunks/1zx2q-r32thv1.js +4 -0
  61. package/out/_next/static/chunks/2-sjjedfr0kfq.js +1 -0
  62. package/out/_next/static/chunks/21o42k82w4llc.js +1 -0
  63. package/out/_next/static/chunks/25b9x-li-tvk2.js +1 -0
  64. package/out/_next/static/chunks/2712627rfsmwn.js +1 -0
  65. package/out/_next/static/chunks/296w2ke-v5tbm.js +9 -0
  66. package/out/_next/static/chunks/29tfeb6amdkjb.js +23 -0
  67. package/out/_next/static/chunks/2a3spdq-m8drh.js +3 -0
  68. package/out/_next/static/chunks/2aelw3far6rii.js +1 -0
  69. package/out/_next/static/chunks/2aor7m-wbis85.js +1 -0
  70. package/out/_next/static/chunks/2cbmf9m7lqv6k.js +4 -0
  71. package/out/_next/static/chunks/2d09v5u7dfq0q.js +1 -0
  72. package/out/_next/static/chunks/2feca0xcipcyt.js +850 -0
  73. package/out/_next/static/chunks/2fh-_9b6tqhvb.js +1 -0
  74. package/out/_next/static/chunks/2g5gecypj0rqe.js +1 -0
  75. package/out/_next/static/chunks/2kazjq29jeamx.js +1109 -0
  76. package/out/_next/static/chunks/2p2vv6cc9i-3q.js +255 -0
  77. package/out/_next/static/chunks/2szdcpl41-kzv.js +1 -0
  78. package/out/_next/static/chunks/2tws5udjdcmh3.js +1 -0
  79. package/out/_next/static/chunks/2u6shh3oeycm-.js +1 -0
  80. package/out/_next/static/chunks/2unhhuv0arlcv.js +1 -0
  81. package/out/_next/static/chunks/2xwy0-qfho1iz.js +91 -0
  82. package/out/_next/static/chunks/2ycvtdd68gub7.js +1 -0
  83. package/out/_next/static/chunks/2yiy_l8bwiw2_.js +3 -0
  84. package/out/_next/static/chunks/2yph6f7khgqii.js +1 -0
  85. package/out/_next/static/chunks/3-shckrcpvbxu.js +1681 -0
  86. package/out/_next/static/chunks/30fq_t9e2_fv-.js +1 -0
  87. package/out/_next/static/chunks/30yzu213bqtq0.js +5 -0
  88. package/out/_next/static/chunks/310uz81hnnzsu.js +1 -0
  89. package/out/_next/static/chunks/3218lp8l0a5g_.js +1 -0
  90. package/out/_next/static/chunks/35h5n42wxwgzk.js +123 -0
  91. package/out/_next/static/chunks/37vzwr3ciejf1.js +1 -0
  92. package/out/_next/static/chunks/38fhw7fatsyvd.js +3 -0
  93. package/out/_next/static/chunks/3be6s4_kn9q-o.js +1 -0
  94. package/out/_next/static/chunks/3i3gbhccmhu7j.js +210 -0
  95. package/out/_next/static/chunks/3l1dr_qm_x5kp.js +1 -0
  96. package/out/_next/static/chunks/3mqy-84_ul3t2.js +1 -0
  97. package/out/_next/static/chunks/3nz-dh9d7cehk.js +1 -0
  98. package/out/_next/static/chunks/3pufs8g4ui943.js +1 -0
  99. package/out/_next/static/chunks/3sjq_xoi4rbyg.js +31 -0
  100. package/out/_next/static/chunks/3t06schbtqonl.js +1 -0
  101. package/out/_next/static/chunks/3v3-7fio3nw_t.js +1 -0
  102. package/out/_next/static/chunks/3v5ha25nxo43j.js +1 -0
  103. package/out/_next/static/chunks/3yfrsm8lfi6ls.js +22 -0
  104. package/out/_next/static/chunks/3zskk1hxu3-_o.js +1 -0
  105. package/out/_next/static/chunks/turbopack-2ropzf0axp1x9.js +1 -0
  106. package/out/_next/static/media/0c89a48fa5027cee-s.p.2cyn07wtgehh0.woff2 +0 -0
  107. package/out/_next/static/media/13bf9871fe164e7f-s.2f7nqdagzwx2-.woff2 +0 -0
  108. package/out/_next/static/media/28868e710e86be81-s.2eksvhm1z0jwa.woff2 +0 -0
  109. package/out/_next/static/media/32687112bd2dd8db-s.1gepa_7fcx9fm.woff2 +0 -0
  110. package/out/_next/static/media/3fe682a82f50d426-s.0vfdmo25voy_0.woff2 +0 -0
  111. package/out/_next/static/media/70bc3e132a0a741e-s.p.3t6q91iet4nsy.woff2 +0 -0
  112. package/out/_next/static/media/71b036adf157cdcf-s.0bp8oijd_gu96.woff2 +0 -0
  113. package/out/_next/static/media/89b21bb081cb7469-s.1fby2rem9ngyr.woff2 +0 -0
  114. package/out/_next/static/media/cc545e633e20c56d-s.176arc174-8zp.woff2 +0 -0
  115. package/out/_next/static/media/icon.08h29dad3pcxg.svg +4 -0
  116. package/out/_not-found/__next._full.txt +16 -0
  117. package/out/_not-found/__next._head.txt +6 -0
  118. package/out/_not-found/__next._index.txt +5 -0
  119. package/out/_not-found/__next._not-found.__PAGE__.txt +5 -0
  120. package/out/_not-found/__next._not-found.txt +5 -0
  121. package/out/_not-found/__next._tree.txt +2 -0
  122. package/out/_not-found.html +1 -0
  123. package/out/_not-found.txt +16 -0
  124. package/out/api/projects +1 -0
  125. package/out/icon.svg +4 -0
  126. package/out/index.html +1 -0
  127. package/out/index.txt +20 -0
  128. package/out/logo.svg +46 -0
  129. package/package.json +67 -0
  130. package/server/standalone.mjs +182 -0
@@ -0,0 +1,1109 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4357,e=>{"use strict";var t=e.i(12423);let r="helperFunctions",i=`const PI: f32=3.1415926535897932384626433832795;const TWO_PI: f32=6.283185307179586;const HALF_PI: f32=1.5707963267948966;const RECIPROCAL_PI: f32=0.3183098861837907;const RECIPROCAL_PI2: f32=0.15915494309189535;const RECIPROCAL_PI4: f32=0.07957747154594767;const HALF_MIN: f32=5.96046448e-08;
2
+ const LinearEncodePowerApprox: f32=2.2;const GammaEncodePowerApprox: f32=1.0/LinearEncodePowerApprox;const LuminanceEncodeApprox: vec3f=vec3f(0.2126,0.7152,0.0722);const Epsilon:f32=0.0000001;fn square(x: f32)->f32 {return x*x;}
3
+ fn saturate(x: f32)->f32 {return clamp(x,0.0,1.0);}
4
+ fn saturateVec3(x: vec3f)->vec3f {return clamp(x,vec3f(),vec3f(1.0));}
5
+ fn saturateEps(x: f32)->f32 {return clamp(x,Epsilon,1.0);}
6
+ fn maxEps(x: f32)->f32 {return max(x,Epsilon);}
7
+ fn maxEpsVec3(x: vec3f)->vec3f {return max(x,vec3f(Epsilon));}
8
+ fn absEps(x: f32)->f32 {return abs(x)+Epsilon;}
9
+ fn transposeMat3(inMatrix: mat3x3f)->mat3x3f {let i0: vec3f=inMatrix[0];let i1: vec3f=inMatrix[1];let i2: vec3f=inMatrix[2];let outMatrix:mat3x3f=mat3x3f(
10
+ vec3(i0.x,i1.x,i2.x),
11
+ vec3(i0.y,i1.y,i2.y),
12
+ vec3(i0.z,i1.z,i2.z)
13
+ );return outMatrix;}
14
+ fn inverseMat3(inMatrix: mat3x3f)->mat3x3f {let a00: f32=inMatrix[0][0];let a01: f32=inMatrix[0][1];let a02: f32=inMatrix[0][2];let a10: f32=inMatrix[1][0];let a11: f32=inMatrix[1][1];let a12: f32=inMatrix[1][2];let a20: f32=inMatrix[2][0];let a21: f32=inMatrix[2][1];let a22: f32=inMatrix[2][2];let b01: f32=a22*a11-a12*a21;let b11: f32=-a22*a10+a12*a20;let b21: f32=a21*a10-a11*a20;let det: f32=a00*b01+a01*b11+a02*b21;return mat3x3f(b01/det,(-a22*a01+a02*a21)/det,(a12*a01-a02*a11)/det,
15
+ b11/det,(a22*a00-a02*a20)/det,(-a12*a00+a02*a10)/det,
16
+ b21/det,(-a21*a00+a01*a20)/det,(a11*a00-a01*a10)/det);}
17
+ #if USE_EXACT_SRGB_CONVERSIONS
18
+ fn toLinearSpaceExact(color: vec3f)->vec3f
19
+ {let nearZeroSection: vec3f=0.0773993808*color;let remainingSection: vec3f=pow(0.947867299*(color+vec3f(0.055)),vec3f(2.4));return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3f(0.04045)));}
20
+ fn toGammaSpaceExact(color: vec3f)->vec3f
21
+ {let nearZeroSection: vec3f=12.92*color;let remainingSection: vec3f=1.055*pow(color,vec3f(0.41666))-vec3f(0.055);return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3f(0.0031308)));}
22
+ #endif
23
+ fn toLinearSpace(color: f32)->f32
24
+ {
25
+ #if USE_EXACT_SRGB_CONVERSIONS
26
+ var nearZeroSection=0.0773993808*color;var remainingSection=pow(0.947867299*(color+0.055),2.4);return select(remainingSection,nearZeroSection,color<=0.04045);
27
+ #else
28
+ return pow(color,LinearEncodePowerApprox);
29
+ #endif
30
+ }
31
+ fn toLinearSpaceVec3(color: vec3f)->vec3f
32
+ {
33
+ #if USE_EXACT_SRGB_CONVERSIONS
34
+ return toLinearSpaceExact(color);
35
+ #else
36
+ return pow(color,vec3f(LinearEncodePowerApprox));
37
+ #endif
38
+ }
39
+ fn toLinearSpaceVec4(color: vec4<f32>)->vec4<f32>
40
+ {
41
+ #if USE_EXACT_SRGB_CONVERSIONS
42
+ return vec4f(toLinearSpaceExact(color.rgb),color.a);
43
+ #else
44
+ return vec4f(pow(color.rgb,vec3f(LinearEncodePowerApprox)),color.a);
45
+ #endif
46
+ }
47
+ fn toGammaSpace(color: vec4<f32>)->vec4<f32>
48
+ {
49
+ #if USE_EXACT_SRGB_CONVERSIONS
50
+ return vec4<f32>(toGammaSpaceExact(color.rgb),color.a);
51
+ #else
52
+ return vec4<f32>(pow(color.rgb,vec3f(GammaEncodePowerApprox)),color.a);
53
+ #endif
54
+ }
55
+ fn toGammaSpaceVec3(color: vec3f)->vec3f
56
+ {
57
+ #if USE_EXACT_SRGB_CONVERSIONS
58
+ return toGammaSpaceExact(color);
59
+ #else
60
+ return pow(color,vec3f(GammaEncodePowerApprox));
61
+ #endif
62
+ }
63
+ fn squareVec3(value: vec3f)->vec3f
64
+ {return value*value;}
65
+ fn pow5(value: f32)->f32 {let sq: f32=value*value;return sq*sq*value;}
66
+ fn double_refract(I: vec3f,N: vec3f,eta: f32)->vec3f {let Tfront: vec3f=refract(I,N,1.0/eta);let Nback: vec3f=normalize(reflect(N,Tfront));return refract(Tfront,-Nback,eta);}
67
+ fn getLuminanceUnclamped(color: vec3f)->f32
68
+ {return dot(color,LuminanceEncodeApprox);}
69
+ fn getLuminance(color: vec3f)->f32
70
+ {return saturate(getLuminanceUnclamped(color));}
71
+ fn getRand(seed: vec2<f32>)->f32 {return fract(sin(dot(seed.xy ,vec2<f32>(12.9898,78.233)))*43758.5453);}
72
+ fn dither(seed: vec2<f32>,varianceAmount: f32)->f32 {let rand: f32=getRand(seed);let normVariance: f32=varianceAmount/255.0;let dither: f32=mix(-normVariance,normVariance,rand);return dither;}
73
+ const rgbdMaxRange: f32=255.0;fn toRGBD(color: vec3f)->vec4<f32> {let maxRGB: f32=max(max(color.r,max(color.g,color.b)),Epsilon);var D: f32 =max(rgbdMaxRange/maxRGB,1.);D =clamp(floor(D)/255.0,0.,1.);var rgb: vec3f =color.rgb*D;rgb=toGammaSpaceVec3(rgb);return vec4<f32>(saturateVec3(rgb),D);}
74
+ fn fromRGBD(rgbd: vec4<f32>)->vec3f {let rgb=toLinearSpaceVec3(rgbd.rgb);return rgb/rgbd.a;}
75
+ fn parallaxCorrectNormal(vertexPos: vec3f,origVec: vec3f,cubeSize: vec3f,cubePos: vec3f)->vec3f {let invOrigVec: vec3f=vec3f(1.)/origVec;let halfSize: vec3f=cubeSize*0.5;let intersecAtMaxPlane: vec3f=(cubePos+halfSize-vertexPos)*invOrigVec;let intersecAtMinPlane: vec3f=(cubePos-halfSize-vertexPos)*invOrigVec;let largestIntersec: vec3f=max(intersecAtMaxPlane,intersecAtMinPlane);let distance: f32=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);let intersectPositionWS: vec3f=vertexPos+origVec*distance;return intersectPositionWS-cubePos;}
76
+ fn equirectangularToCubemapDirection(uv : vec2f)->vec3f {var longitude : f32=uv.x*TWO_PI-PI;var latitude : f32=HALF_PI-uv.y*PI;var direction : vec3f;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}
77
+ fn sqrtClamped(value: f32)->f32 {return sqrt(max(value,0.));}
78
+ fn avg(value: vec3f)->f32 {return dot(value,vec3f(0.333333333));}
79
+ fn singleScatterToMultiScatterAlbedo(rho_ss: vec3f)->vec3f {let s: vec3f=sqrt(max(vec3f(1.0)-rho_ss,vec3f(0.0)));return (vec3f(1.0)-s)*(vec3f(1.0)-vec3f(0.139)*s)/(vec3f(1.0)+vec3f(1.17)*s);}
80
+ fn multiScatterToSingleScatterAlbedo(rho_ms: vec3f)->vec3f {let s: vec3f=4.09712f+4.20863f*rho_ms-sqrt(9.59217f+41.6808f*rho_ms+17.7126f*rho_ms*rho_ms);return 1.0f-s*s;}
81
+ fn multiScatterToSingleScatterAlbedoWithAniso(rho_ms: vec3f,aniso: f32)->vec3f {let s: vec3f=4.09712+4.20863f*rho_ms-sqrt(9.59217f+41.6808f*rho_ms+17.7126f*rho_ms*rho_ms);return (vec3f(1.0f)-s*s)/maxEpsVec3(vec3f(1.0f)-vec3f(aniso)*s*s);}
82
+ fn min3(v: vec3f)->f32 {return min(v.x,min(v.y,v.z));}
83
+ fn max3(v: vec3f)->f32 {return max(v.x,max(v.y,v.z));}
84
+ fn uint2float(i: u32)->f32 {return bitcast<f32>(0x3F800000u | (i>>9u))-1.0;}
85
+ fn plasticSequence(rstate: u32)->vec2f {return vec2f(uint2float(rstate*3242174889u),
86
+ uint2float(rstate*2447445414u));}
87
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["helperFunctionsWGSL",0,{name:r,shader:i}])},60106,50008,84933,39780,54758,e=>{"use strict";var t=e.i(12423);let r="sceneUboDeclaration",i=`struct Scene {viewProjection : mat4x4<f32>,
88
+ #ifdef MULTIVIEW
89
+ viewProjectionR : mat4x4<f32>,
90
+ #endif
91
+ view : mat4x4<f32>,
92
+ projection : mat4x4<f32>,
93
+ vEyePosition : vec4<f32>,
94
+ inverseProjection : mat4x4<f32>,};
95
+ #define SCENE_UBO
96
+ var<uniform> scene : Scene;
97
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["sceneUboDeclarationWGSL",0,{name:r,shader:i}],60106);let n="meshUboDeclaration",a=`struct Mesh {world : mat4x4<f32>,
98
+ visibility : f32,};var<uniform> mesh : Mesh;
99
+ #define WORLD_UBO
100
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["meshUboDeclarationWGSL",0,{name:n,shader:a}],50008);let f="defaultUboDeclaration",o=`uniform diffuseLeftColor: vec4f;uniform diffuseRightColor: vec4f;uniform opacityParts: vec4f;uniform reflectionLeftColor: vec4f;uniform reflectionRightColor: vec4f;uniform refractionLeftColor: vec4f;uniform refractionRightColor: vec4f;uniform emissiveLeftColor: vec4f;uniform emissiveRightColor: vec4f;uniform vDiffuseInfos: vec2f;uniform vAmbientInfos: vec2f;uniform vOpacityInfos: vec2f;uniform vEmissiveInfos: vec2f;uniform vLightmapInfos: vec2f;uniform vSpecularInfos: vec2f;uniform vBumpInfos: vec3f;uniform diffuseMatrix: mat4x4f;uniform ambientMatrix: mat4x4f;uniform opacityMatrix: mat4x4f;uniform emissiveMatrix: mat4x4f;uniform lightmapMatrix: mat4x4f;uniform specularMatrix: mat4x4f;uniform bumpMatrix: mat4x4f;uniform vTangentSpaceParams: vec2f;uniform pointSize: f32;uniform alphaCutOff: f32;uniform refractionMatrix: mat4x4f;uniform vRefractionInfos: vec4f;uniform vRefractionPosition: vec3f;uniform vRefractionSize: vec3f;uniform vSpecularColor: vec4f;uniform vEmissiveColor: vec3f;uniform vDiffuseColor: vec4f;uniform vAmbientColor: vec3f;uniform cameraInfo: vec4f;uniform vTextureRepetitionHexTilingParams: vec4f;uniform vReflectionInfos: vec2f;uniform reflectionMatrix: mat4x4f;uniform vReflectionPosition: vec3f;uniform vReflectionSize: vec3f;
101
+ #define ADDITIONAL_UBO_DECLARATION
102
+ #include<sceneUboDeclaration>
103
+ #include<meshUboDeclaration>
104
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["defaultUboDeclarationWGSL",0,{name:f,shader:o}],84933);let d="mainUVVaryingDeclaration",s=`#ifdef MAINUV{X}
105
+ varying vMainUV{X}: vec2f;
106
+ #endif
107
+ `;t.ShaderStore.IncludesShadersStoreWGSL[d]||(t.ShaderStore.IncludesShadersStoreWGSL[d]=s),e.s(["mainUVVaryingDeclarationWGSL",0,{name:d,shader:s}],39780);let u="logDepthDeclaration",l=`#ifdef LOGARITHMICDEPTH
108
+ uniform logarithmicDepthConstant: f32;varying vFragmentDepth: f32;
109
+ #endif
110
+ `;t.ShaderStore.IncludesShadersStoreWGSL[u]||(t.ShaderStore.IncludesShadersStoreWGSL[u]=l),e.s(["logDepthDeclarationWGSL",0,{name:u,shader:l}],54758)},45329,35011,e=>{"use strict";var t=e.i(12423);let r="bonesDeclaration",i=`#if NUM_BONE_INFLUENCERS>0
111
+ #ifndef USE_VERTEX_PULLING
112
+ attribute matricesIndices : vec4f;attribute matricesWeights : vec4f;
113
+ #if NUM_BONE_INFLUENCERS>4
114
+ attribute matricesIndicesExtra : vec4f;attribute matricesWeightsExtra : vec4f;
115
+ #endif
116
+ #endif
117
+ #ifndef BAKED_VERTEX_ANIMATION_TEXTURE
118
+ #ifdef BONETEXTURE
119
+ var boneSampler : texture_2d<f32>;uniform boneTextureInfo : vec2f;
120
+ #else
121
+ uniform mBones : array<mat4x4f,BonesPerMesh>;
122
+ #endif
123
+ #ifdef BONES_VELOCITY_ENABLED
124
+ uniform mPreviousBones : array<mat4x4f,BonesPerMesh>;
125
+ #endif
126
+ #ifdef BONETEXTURE
127
+ fn readMatrixFromRawSampler(smp : texture_2d<f32>,index : f32)->mat4x4f
128
+ {let offset=i32(index)*4;
129
+ let textureWidth=i32(uniforms.boneTextureInfo.x);let y=offset/textureWidth;let x=offset % textureWidth;let m0=textureLoad(smp,vec2<i32>(x+0,y),0);let m1=textureLoad(smp,vec2<i32>(x+1,y),0);let m2=textureLoad(smp,vec2<i32>(x+2,y),0);let m3=textureLoad(smp,vec2<i32>(x+3,y),0);return mat4x4f(m0,m1,m2,m3);}
130
+ #endif
131
+ #endif
132
+ #endif
133
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["bonesDeclarationWGSL",0,{name:r,shader:i}],45329);let n="bakedVertexAnimationDeclaration",a=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
134
+ uniform bakedVertexAnimationTime: f32;uniform bakedVertexAnimationSettings: vec4<f32>;var bakedVertexAnimationTexture : texture_2d<f32>;
135
+ #ifdef INSTANCES
136
+ attribute bakedVertexAnimationSettingsInstanced : vec4<f32>;
137
+ #endif
138
+ fn readMatrixFromRawSamplerVAT(smp : texture_2d<f32>,index : f32,frame : f32)->mat4x4<f32>
139
+ {let offset=i32(index)*4;let frameUV=i32(frame);let m0=textureLoad(smp,vec2<i32>(offset+0,frameUV),0);let m1=textureLoad(smp,vec2<i32>(offset+1,frameUV),0);let m2=textureLoad(smp,vec2<i32>(offset+2,frameUV),0);let m3=textureLoad(smp,vec2<i32>(offset+3,frameUV),0);return mat4x4<f32>(m0,m1,m2,m3);}
140
+ #endif
141
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["bakedVertexAnimationDeclarationWGSL",0,{name:n,shader:a}],35011)},18062,e=>{"use strict";var t=e.i(12423);let r="instancesDeclaration",i=`#ifdef INSTANCES
142
+ attribute world0 : vec4<f32>;attribute world1 : vec4<f32>;attribute world2 : vec4<f32>;attribute world3 : vec4<f32>;
143
+ #ifdef INSTANCESCOLOR
144
+ attribute instanceColor : vec4<f32>;
145
+ #endif
146
+ #if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
147
+ uniform world : mat4x4<f32>;
148
+ #endif
149
+ #if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
150
+ attribute previousWorld0 : vec4<f32>;attribute previousWorld1 : vec4<f32>;attribute previousWorld2 : vec4<f32>;attribute previousWorld3 : vec4<f32>;
151
+ #ifdef THIN_INSTANCES
152
+ uniform previousWorld : mat4x4<f32>;
153
+ #endif
154
+ #endif
155
+ #else
156
+ #if !defined(WORLD_UBO)
157
+ uniform world : mat4x4<f32>;
158
+ #endif
159
+ #if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
160
+ uniform previousWorld : mat4x4<f32>;
161
+ #endif
162
+ #endif
163
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["instancesDeclarationWGSL",0,{name:r,shader:i}])},77785,75234,e=>{"use strict";var t=e.i(12423);let r="clipPlaneVertexDeclaration",i=`#ifdef CLIPPLANE
164
+ uniform vClipPlane: vec4<f32>;varying fClipDistance: f32;
165
+ #endif
166
+ #ifdef CLIPPLANE2
167
+ uniform vClipPlane2: vec4<f32>;varying fClipDistance2: f32;
168
+ #endif
169
+ #ifdef CLIPPLANE3
170
+ uniform vClipPlane3: vec4<f32>;varying fClipDistance3: f32;
171
+ #endif
172
+ #ifdef CLIPPLANE4
173
+ uniform vClipPlane4: vec4<f32>;varying fClipDistance4: f32;
174
+ #endif
175
+ #ifdef CLIPPLANE5
176
+ uniform vClipPlane5: vec4<f32>;varying fClipDistance5: f32;
177
+ #endif
178
+ #ifdef CLIPPLANE6
179
+ uniform vClipPlane6: vec4<f32>;varying fClipDistance6: f32;
180
+ #endif
181
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["clipPlaneVertexDeclarationWGSL",0,{name:r,shader:i}],77785);let n="fogVertexDeclaration",a=`#ifdef FOG
182
+ varying vFogDistance: vec3f;
183
+ #endif
184
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["fogVertexDeclarationWGSL",0,{name:n,shader:a}],75234)},50331,3350,35845,3878,42893,8154,e=>{"use strict";var t=e.i(12423);let r="instancesVertex",i=`#ifdef INSTANCES
185
+ var finalWorld=mat4x4<f32>(vertexInputs.world0,vertexInputs.world1,vertexInputs.world2,vertexInputs.world3);
186
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
187
+ var finalPreviousWorld=mat4x4<f32>(
188
+ vertexInputs.previousWorld0,vertexInputs.previousWorld1,
189
+ vertexInputs.previousWorld2,vertexInputs.previousWorld3);
190
+ #endif
191
+ #ifdef THIN_INSTANCES
192
+ #if !defined(WORLD_UBO)
193
+ finalWorld=uniforms.world*finalWorld;
194
+ #else
195
+ finalWorld=mesh.world*finalWorld;
196
+ #endif
197
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
198
+ finalPreviousWorld=uniforms.previousWorld*finalPreviousWorld;
199
+ #endif
200
+ #endif
201
+ #else
202
+ #if !defined(WORLD_UBO)
203
+ var finalWorld=uniforms.world;
204
+ #else
205
+ var finalWorld=mesh.world;
206
+ #endif
207
+ #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
208
+ var finalPreviousWorld=uniforms.previousWorld;
209
+ #endif
210
+ #endif
211
+ `;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["instancesVertexWGSL",0,{name:r,shader:i}],50331);let n="bonesVertex",a=`#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
212
+ #if NUM_BONE_INFLUENCERS>0
213
+ var influence : mat4x4<f32>;
214
+ #ifdef BONETEXTURE
215
+ influence=readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[0])*vertexInputs.matricesWeights[0];
216
+ #if NUM_BONE_INFLUENCERS>1
217
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[1])*vertexInputs.matricesWeights[1];
218
+ #endif
219
+ #if NUM_BONE_INFLUENCERS>2
220
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[2])*vertexInputs.matricesWeights[2];
221
+ #endif
222
+ #if NUM_BONE_INFLUENCERS>3
223
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndices[3])*vertexInputs.matricesWeights[3];
224
+ #endif
225
+ #if NUM_BONE_INFLUENCERS>4
226
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[0])*vertexInputs.matricesWeightsExtra[0];
227
+ #endif
228
+ #if NUM_BONE_INFLUENCERS>5
229
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[1])*vertexInputs.matricesWeightsExtra[1];
230
+ #endif
231
+ #if NUM_BONE_INFLUENCERS>6
232
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[2])*vertexInputs.matricesWeightsExtra[2];
233
+ #endif
234
+ #if NUM_BONE_INFLUENCERS>7
235
+ influence=influence+readMatrixFromRawSampler(boneSampler,vertexInputs.matricesIndicesExtra[3])*vertexInputs.matricesWeightsExtra[3];
236
+ #endif
237
+ #else
238
+ influence=uniforms.mBones[i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];
239
+ #if NUM_BONE_INFLUENCERS>1
240
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];
241
+ #endif
242
+ #if NUM_BONE_INFLUENCERS>2
243
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];
244
+ #endif
245
+ #if NUM_BONE_INFLUENCERS>3
246
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];
247
+ #endif
248
+ #if NUM_BONE_INFLUENCERS>4
249
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];
250
+ #endif
251
+ #if NUM_BONE_INFLUENCERS>5
252
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];
253
+ #endif
254
+ #if NUM_BONE_INFLUENCERS>6
255
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];
256
+ #endif
257
+ #if NUM_BONE_INFLUENCERS>7
258
+ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];
259
+ #endif
260
+ #endif
261
+ finalWorld=finalWorld*influence;
262
+ #endif
263
+ #endif
264
+ `;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["bonesVertexWGSL",0,{name:n,shader:a}],3350);let f="bakedVertexAnimation",o=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
265
+ {
266
+ #ifdef INSTANCES
267
+ let VATStartFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.x;let VATEndFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.y;let VATOffsetFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.z;let VATSpeed: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.w;
268
+ #else
269
+ let VATStartFrame: f32=uniforms.bakedVertexAnimationSettings.x;let VATEndFrame: f32=uniforms.bakedVertexAnimationSettings.y;let VATOffsetFrame: f32=uniforms.bakedVertexAnimationSettings.z;let VATSpeed: f32=uniforms.bakedVertexAnimationSettings.w;
270
+ #endif
271
+ let totalFrames: f32=VATEndFrame-VATStartFrame+1.0;let time: f32=uniforms.bakedVertexAnimationTime*VATSpeed/totalFrames;let frameCorrection: f32=select(1.0,0.0,time<1.0);let numOfFrames: f32=totalFrames-frameCorrection;var VATFrameNum: f32=fract(time)*numOfFrames;VATFrameNum=(VATFrameNum+VATOffsetFrame) % numOfFrames;VATFrameNum=floor(VATFrameNum);VATFrameNum=VATFrameNum+VATStartFrame+frameCorrection;var VATInfluence : mat4x4<f32>;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[0],VATFrameNum)*vertexInputs.matricesWeights[0];
272
+ #if NUM_BONE_INFLUENCERS>1
273
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[1],VATFrameNum)*vertexInputs.matricesWeights[1];
274
+ #endif
275
+ #if NUM_BONE_INFLUENCERS>2
276
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[2],VATFrameNum)*vertexInputs.matricesWeights[2];
277
+ #endif
278
+ #if NUM_BONE_INFLUENCERS>3
279
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndices[3],VATFrameNum)*vertexInputs.matricesWeights[3];
280
+ #endif
281
+ #if NUM_BONE_INFLUENCERS>4
282
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[0],VATFrameNum)*vertexInputs.matricesWeightsExtra[0];
283
+ #endif
284
+ #if NUM_BONE_INFLUENCERS>5
285
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[1],VATFrameNum)*vertexInputs.matricesWeightsExtra[1];
286
+ #endif
287
+ #if NUM_BONE_INFLUENCERS>6
288
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[2],VATFrameNum)*vertexInputs.matricesWeightsExtra[2];
289
+ #endif
290
+ #if NUM_BONE_INFLUENCERS>7
291
+ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,vertexInputs.matricesIndicesExtra[3],VATFrameNum)*vertexInputs.matricesWeightsExtra[3];
292
+ #endif
293
+ finalWorld=finalWorld*VATInfluence;}
294
+ #endif
295
+ `;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=o),e.s(["bakedVertexAnimationWGSL",0,{name:f,shader:o}],35845);let d="clipPlaneVertex",s=`#ifdef CLIPPLANE
296
+ vertexOutputs.fClipDistance=dot(worldPos,uniforms.vClipPlane);
297
+ #endif
298
+ #ifdef CLIPPLANE2
299
+ vertexOutputs.fClipDistance2=dot(worldPos,uniforms.vClipPlane2);
300
+ #endif
301
+ #ifdef CLIPPLANE3
302
+ vertexOutputs.fClipDistance3=dot(worldPos,uniforms.vClipPlane3);
303
+ #endif
304
+ #ifdef CLIPPLANE4
305
+ vertexOutputs.fClipDistance4=dot(worldPos,uniforms.vClipPlane4);
306
+ #endif
307
+ #ifdef CLIPPLANE5
308
+ vertexOutputs.fClipDistance5=dot(worldPos,uniforms.vClipPlane5);
309
+ #endif
310
+ #ifdef CLIPPLANE6
311
+ vertexOutputs.fClipDistance6=dot(worldPos,uniforms.vClipPlane6);
312
+ #endif
313
+ `;t.ShaderStore.IncludesShadersStoreWGSL[d]||(t.ShaderStore.IncludesShadersStoreWGSL[d]=s),e.s(["clipPlaneVertexWGSL",0,{name:d,shader:s}],3878);let u="fogVertex",l=`#ifdef FOG
314
+ #ifdef SCENE_UBO
315
+ vertexOutputs.vFogDistance=(scene.view*worldPos).xyz;
316
+ #else
317
+ vertexOutputs.vFogDistance=(uniforms.view*worldPos).xyz;
318
+ #endif
319
+ #endif
320
+ `;t.ShaderStore.IncludesShadersStoreWGSL[u]||(t.ShaderStore.IncludesShadersStoreWGSL[u]=l),e.s(["fogVertexWGSL",0,{name:u,shader:l}],42893);let v="vertexColorMixing",c=`#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
321
+ vertexOutputs.vColor=vec4f(1.0);
322
+ #ifdef VERTEXCOLOR
323
+ #ifdef VERTEXALPHA
324
+ vertexOutputs.vColor*=colorUpdated;
325
+ #else
326
+ vertexOutputs.vColor=vec4f(vertexOutputs.vColor.rgb*colorUpdated.rgb,vertexOutputs.vColor.a);
327
+ #endif
328
+ #endif
329
+ #ifdef INSTANCESCOLOR
330
+ vertexOutputs.vColor*=vertexInputs.instanceColor;
331
+ #endif
332
+ #endif
333
+ `;t.ShaderStore.IncludesShadersStoreWGSL[v]||(t.ShaderStore.IncludesShadersStoreWGSL[v]=c),e.s(["vertexColorMixingWGSL",0,{name:v,shader:c}],8154)},14610,e=>{"use strict";var t=e.i(12423),r=e.i(60106),i=e.i(50008),n=e.i(84933);let a="uvAttributeDeclaration",f=`#if defined(UV{X}) && !defined(USE_VERTEX_PULLING)
334
+ attribute uv{X}: vec2f;
335
+ #endif
336
+ `;t.ShaderStore.IncludesShadersStoreWGSL[a]||(t.ShaderStore.IncludesShadersStoreWGSL[a]=f);var o=e.i(4357),d=e.i(45329),s=e.i(35011),u=e.i(18062);let l="prePassVertexDeclaration",v=`#ifdef PREPASS
337
+ #ifdef PREPASS_LOCAL_POSITION
338
+ varying vPosition : vec3f;
339
+ #endif
340
+ #ifdef PREPASS_DEPTH
341
+ varying vViewPos: vec3f;
342
+ #endif
343
+ #ifdef PREPASS_NORMALIZED_VIEW_DEPTH
344
+ varying vNormViewDepth: f32;
345
+ #endif
346
+ #if defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)
347
+ uniform previousViewProjection: mat4x4f;varying vCurrentPosition: vec4f;varying vPreviousPosition: vec4f;
348
+ #endif
349
+ #endif
350
+ `;t.ShaderStore.IncludesShadersStoreWGSL[l]||(t.ShaderStore.IncludesShadersStoreWGSL[l]=v);var c=e.i(39780);let m="samplerVertexDeclaration",p=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
351
+ varying v_VARYINGNAME_UV: vec2f;
352
+ #endif
353
+ `;t.ShaderStore.IncludesShadersStoreWGSL[m]||(t.ShaderStore.IncludesShadersStoreWGSL[m]=p);let x="bumpVertexDeclaration",S=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
354
+ #if defined(TANGENT) && defined(NORMAL)
355
+ varying vTBN0: vec3f;varying vTBN1: vec3f;varying vTBN2: vec3f;
356
+ #endif
357
+ #endif
358
+ `;t.ShaderStore.IncludesShadersStoreWGSL[x]||(t.ShaderStore.IncludesShadersStoreWGSL[x]=S);var E=e.i(77785),I=e.i(75234);let _="lightVxFragmentDeclaration",T=`#ifdef LIGHT{X}
359
+ uniform vLightData{X}: vec4f;uniform vLightDiffuse{X}: vec4f;
360
+ #ifdef SPECULARTERM
361
+ uniform vLightSpecular{X}: vec4f;
362
+ #else
363
+ var vLightSpecular{X}: vec4f= vec4f(0.);
364
+ #endif
365
+ #ifdef SHADOW{X}
366
+ #ifdef SHADOWCSM{X}
367
+ uniform 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;
368
+ #elif defined(SHADOWCUBE{X})
369
+ #else
370
+ varying var vPositionFromLight{X}: vec4f;varying var vDepthMetric{X}: f32;uniform lightMatrix{X}: mat4x4f;
371
+ #endif
372
+ uniform shadowsInfo{X}: vec4f;uniform depthValues{X}: vec2f;
373
+ #endif
374
+ #ifdef SPOTLIGHT{X}
375
+ uniform vLightDirection{X}: vec4f;uniform vLightFalloff{X}: vec4f;
376
+ #elif defined(POINTLIGHT{X})
377
+ uniform vLightFalloff{X}: vec4f;
378
+ #elif defined(HEMILIGHT{X})
379
+ uniform vLightGround{X}: vec3f;
380
+ #endif
381
+ #if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
382
+ uniform vLightWidth{X}: vec4f;uniform vLightHeight{X}: vec4f;
383
+ #endif
384
+ #endif
385
+ `;t.ShaderStore.IncludesShadersStoreWGSL[_]||(t.ShaderStore.IncludesShadersStoreWGSL[_]=T);let N="lightVxUboDeclaration",V=`#ifdef LIGHT{X}
386
+ struct Light{X}
387
+ {vLightData: vec4f,
388
+ vLightDiffuse: vec4f,
389
+ vLightSpecular: vec4f,
390
+ #ifdef SPOTLIGHT{X}
391
+ vLightDirection: vec4f,
392
+ vLightFalloff: vec4f,
393
+ #elif defined(POINTLIGHT{X})
394
+ vLightFalloff: vec4f,
395
+ #elif defined(HEMILIGHT{X})
396
+ vLightGround: vec3f,
397
+ #elif defined(CLUSTLIGHT{X})
398
+ vSliceData: vec2f,
399
+ vSliceRanges: array<vec4f,CLUSTLIGHT_SLICES>,
400
+ #endif
401
+ #if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
402
+ vLightWidth: vec4f,
403
+ vLightHeight: vec4f,
404
+ #endif
405
+ shadowsInfo: vec4f,
406
+ depthValues: vec2f} ;var<uniform> light{X} : Light{X};
407
+ #ifdef SHADOW{X}
408
+ #ifdef SHADOWCSM{X}
409
+ uniform lightMatrix{X}: array<mat4x4f,SHADOWCSMNUM_CASCADES{X}>;varying vPositionFromLight{X}_0: vec4f;varying vDepthMetric{X}_0: f32;varying vPositionFromLight{X}_1: vec4f;varying vDepthMetric{X}_1: f32;varying vPositionFromLight{X}_2: vec4f;varying vDepthMetric{X}_2: f32;varying vPositionFromLight{X}_3: vec4f;varying vDepthMetric{X}_3: f32;varying vPositionFromCamera{X}: vec4f;
410
+ #elif defined(SHADOWCUBE{X})
411
+ #else
412
+ varying vPositionFromLight{X}: vec4f;varying vDepthMetric{X}: f32;uniform lightMatrix{X}: mat4x4f;
413
+ #endif
414
+ #endif
415
+ #endif
416
+ `;t.ShaderStore.IncludesShadersStoreWGSL[N]||(t.ShaderStore.IncludesShadersStoreWGSL[N]=V);let h="morphTargetsVertexGlobalDeclaration",A=`#ifdef MORPHTARGETS
417
+ uniform morphTargetInfluences : array<f32,NUM_MORPH_INFLUENCERS>;
418
+ #ifdef MORPHTARGETS_TEXTURE
419
+ uniform morphTargetTextureIndices : array<f32,NUM_MORPH_INFLUENCERS>;uniform morphTargetTextureInfo : vec3<f32>;var morphTargets : texture_2d_array<f32>;fn readVector3FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec3<f32>
420
+ {
421
+ let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0).xyz;}
422
+ fn readVector4FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec4<f32>
423
+ {
424
+ let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);
425
+ let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0);}
426
+ #endif
427
+ #endif
428
+ `;t.ShaderStore.IncludesShadersStoreWGSL[h]||(t.ShaderStore.IncludesShadersStoreWGSL[h]=A);let U="morphTargetsVertexDeclaration",L=`#ifdef MORPHTARGETS
429
+ #ifndef MORPHTARGETS_TEXTURE
430
+ #ifdef MORPHTARGETS_POSITION
431
+ attribute position{X} : vec3<f32>;
432
+ #endif
433
+ #ifdef MORPHTARGETS_NORMAL
434
+ attribute normal{X} : vec3<f32>;
435
+ #endif
436
+ #ifdef MORPHTARGETS_TANGENT
437
+ attribute tangent{X} : vec3<f32>;
438
+ #endif
439
+ #ifdef MORPHTARGETS_UV
440
+ attribute uv_{X} : vec2<f32>;
441
+ #endif
442
+ #ifdef MORPHTARGETS_UV2
443
+ attribute uv2_{X} : vec2<f32>;
444
+ #endif
445
+ #ifdef MORPHTARGETS_COLOR
446
+ attribute color{X} : vec4<f32>;
447
+ #endif
448
+ #elif {X}==0
449
+ uniform morphTargetCount: f32;
450
+ #endif
451
+ #endif
452
+ `;t.ShaderStore.IncludesShadersStoreWGSL[U]||(t.ShaderStore.IncludesShadersStoreWGSL[U]=L);var O=e.i(54758);let R="vertexPullingDeclaration",g=`#ifdef USE_VERTEX_PULLING
453
+ #ifdef VERTEX_PULLING_USE_INDEX_BUFFER
454
+ var<storage,read> indices : array<u32>;
455
+ #endif
456
+ var<storage,read> position : array<f32>;uniform vp_position_info : vec4f;
457
+ #ifdef NORMAL
458
+ var<storage,read> normal : array<f32>;uniform vp_normal_info : vec4f;
459
+ #endif
460
+ #ifdef TANGENT
461
+ var<storage,read> tangent : array<f32>;uniform vp_tangent_info : vec4f;
462
+ #endif
463
+ #ifdef UV1
464
+ var<storage,read> uv : array<f32>;uniform vp_uv_info : vec4f;
465
+ #define VP_UV1_SUPPORTED
466
+ #endif
467
+ #ifdef UV2
468
+ var<storage,read> uv2 : array<f32>;uniform vp_uv2_info : vec4f;
469
+ #define VP_UV2_SUPPORTED
470
+ #endif
471
+ #ifdef UV3
472
+ var<storage,read> uv3 : array<f32>;uniform vp_uv3_info : vec4f;
473
+ #define VP_UV3_SUPPORTED
474
+ #endif
475
+ #ifdef UV4
476
+ var<storage,read> uv4 : array<f32>;uniform vp_uv4_info : vec4f;
477
+ #define VP_UV4_SUPPORTED
478
+ #endif
479
+ #ifdef UV5
480
+ var<storage,read> uv5 : array<f32>;uniform vp_uv5_info : vec4f;
481
+ #define VP_UV5_SUPPORTED
482
+ #endif
483
+ #ifdef UV6
484
+ var<storage,read> uv6 : array<f32>;uniform vp_uv6_info : vec4f;
485
+ #define VP_UV6_SUPPORTED
486
+ #endif
487
+ #ifdef VERTEXCOLOR
488
+ var<storage,read> color : array<f32>;uniform vp_color_info : vec4f;
489
+ #endif
490
+ #if NUM_BONE_INFLUENCERS>0
491
+ var<storage,read> matricesIndices : array<u32>;var<storage,read> matricesWeights : array<f32>;uniform vp_matricesIndices_info : vec4f;uniform vp_matricesWeights_info : vec4f;
492
+ #if NUM_BONE_INFLUENCERS>4
493
+ var<storage,read> matricesIndicesExtra : array<u32>;var<storage,read> matricesWeightsExtra : array<f32>;uniform vp_matricesIndicesExtra_info : vec4f;uniform vp_matricesWeightsExtra_info : vec4f;
494
+ #endif
495
+ #endif
496
+ fn vp_convertToFloat(word : u32,byteInWord : u32,dataType : u32,normalized : bool)->f32 {switch (dataType) {case 5120u: {
497
+ let shift=byteInWord*8u;let value=(word>>shift) & 0xFFu;let signedValue=f32(i32(value<<24u)>>24u);if (normalized) { return signedValue/127.0; }
498
+ return signedValue;}
499
+ case 5121u: {
500
+ let shift=byteInWord*8u;let value=(word>>shift) & 0xFFu;if (normalized) { return f32(value)/255.0; }
501
+ return f32(value);}
502
+ case 5122u: {
503
+ let shift=(byteInWord & 0xFFFFFFFEu)*8u;let value=(word>>shift) & 0xFFFFu;let signedValue=f32(i32(value<<16u)>>16u);if (normalized) { return signedValue/32767.0; }
504
+ return signedValue;}
505
+ case 5123u: {
506
+ let shift=(byteInWord & 0xFFFFFFFEu)*8u;let value=(word>>shift) & 0xFFFFu;if (normalized) { return f32(value)/65535.0; }
507
+ return f32(value);}
508
+ case 5126u: {
509
+ return bitcast<f32>(word);}
510
+ default: { return 0.0; }}}
511
+ fn vp_componentSize(dataType : u32)->u32 {return select(select(2u,1u,dataType==5120u || dataType==5121u),4u,dataType==5126u);}
512
+ fn vp_readVertexIndex(index : u32)->u32 {
513
+ #ifndef VERTEX_PULLING_USE_INDEX_BUFFER
514
+ return index;
515
+ #else
516
+ #ifdef VERTEX_PULLING_INDEX_BUFFER_32BITS
517
+ return indices[index];
518
+ #else
519
+ let u32_index=index/2u;let bit_offset=(index & 1u)*16u;return (indices[u32_index]>>bit_offset) & 0xFFFFu;
520
+ #endif
521
+ #endif
522
+ }
523
+ fn vp_readPositionValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(position[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
524
+ fn vp_readPosition(info : vec4f,vertexIndex : u32)->vec3f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec3f(
525
+ vp_readPositionValue(offset,dataType,normalized),
526
+ vp_readPositionValue(offset+cs,dataType,normalized),
527
+ vp_readPositionValue(offset+cs*2u,dataType,normalized)
528
+ );}
529
+ #ifdef NORMAL
530
+ fn vp_readNormalValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(normal[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
531
+ fn vp_readNormal(info : vec4f,vertexIndex : u32)->vec3f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec3f(
532
+ vp_readNormalValue(offset,dataType,normalized),
533
+ vp_readNormalValue(offset+cs,dataType,normalized),
534
+ vp_readNormalValue(offset+cs*2u,dataType,normalized)
535
+ );}
536
+ #endif
537
+ #ifdef TANGENT
538
+ fn vp_readTangentValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(tangent[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
539
+ fn vp_readTangent(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
540
+ vp_readTangentValue(offset,dataType,normalized),
541
+ vp_readTangentValue(offset+cs,dataType,normalized),
542
+ vp_readTangentValue(offset+cs*2u,dataType,normalized),
543
+ vp_readTangentValue(offset+cs*3u,dataType,normalized)
544
+ );}
545
+ #endif
546
+ #ifdef UV1
547
+ fn vp_readUVValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
548
+ fn vp_readUV(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
549
+ vp_readUVValue(offset,dataType,normalized),
550
+ vp_readUVValue(offset+cs,dataType,normalized)
551
+ );}
552
+ #endif
553
+ #ifdef UV2
554
+ fn vp_readUV2Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv2[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
555
+ fn vp_readUV2(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
556
+ vp_readUV2Value(offset,dataType,normalized),
557
+ vp_readUV2Value(offset+cs,dataType,normalized)
558
+ );}
559
+ #endif
560
+ #ifdef UV3
561
+ fn vp_readUV3Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv3[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
562
+ fn vp_readUV3(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
563
+ vp_readUV3Value(offset,dataType,normalized),
564
+ vp_readUV3Value(offset+cs,dataType,normalized)
565
+ );}
566
+ #endif
567
+ #ifdef UV4
568
+ fn vp_readUV4Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv4[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
569
+ fn vp_readUV4(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
570
+ vp_readUV4Value(offset,dataType,normalized),
571
+ vp_readUV4Value(offset+cs,dataType,normalized)
572
+ );}
573
+ #endif
574
+ #ifdef UV5
575
+ fn vp_readUV5Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv5[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
576
+ fn vp_readUV5(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
577
+ vp_readUV5Value(offset,dataType,normalized),
578
+ vp_readUV5Value(offset+cs,dataType,normalized)
579
+ );}
580
+ #endif
581
+ #ifdef UV6
582
+ fn vp_readUV6Value(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(uv6[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
583
+ fn vp_readUV6(info : vec4f,vertexIndex : u32)->vec2f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec2f(
584
+ vp_readUV6Value(offset,dataType,normalized),
585
+ vp_readUV6Value(offset+cs,dataType,normalized)
586
+ );}
587
+ #endif
588
+ #ifdef VERTEXCOLOR
589
+ fn vp_readColorValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(color[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
590
+ fn vp_readColor(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
591
+ vp_readColorValue(offset,dataType,normalized),
592
+ vp_readColorValue(offset+cs,dataType,normalized),
593
+ vp_readColorValue(offset+cs*2u,dataType,normalized),
594
+ vp_readColorValue(offset+cs*3u,dataType,normalized)
595
+ );}
596
+ #endif
597
+ #if NUM_BONE_INFLUENCERS>0
598
+ fn vp_readMatrixIndexValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(matricesIndices[byteOffset/4u],byteOffset % 4u,dataType,normalized);}
599
+ fn vp_readBoneIndices(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
600
+ vp_readMatrixIndexValue(offset,dataType,normalized),
601
+ vp_readMatrixIndexValue(offset+cs,dataType,normalized),
602
+ vp_readMatrixIndexValue(offset+cs*2u,dataType,normalized),
603
+ vp_readMatrixIndexValue(offset+cs*3u,dataType,normalized)
604
+ );}
605
+ fn vp_readMatrixWeightValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(matricesWeights[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
606
+ fn vp_readBoneWeights(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
607
+ vp_readMatrixWeightValue(offset,dataType,normalized),
608
+ vp_readMatrixWeightValue(offset+cs,dataType,normalized),
609
+ vp_readMatrixWeightValue(offset+cs*2u,dataType,normalized),
610
+ vp_readMatrixWeightValue(offset+cs*3u,dataType,normalized)
611
+ );}
612
+ #if NUM_BONE_INFLUENCERS>4
613
+ fn vp_readMatrixIndexExtraValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(matricesIndicesExtra[byteOffset/4u],byteOffset % 4u,dataType,normalized);}
614
+ fn vp_readBoneIndicesExtra(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
615
+ vp_readMatrixIndexExtraValue(offset,dataType,normalized),
616
+ vp_readMatrixIndexExtraValue(offset+cs,dataType,normalized),
617
+ vp_readMatrixIndexExtraValue(offset+cs*2u,dataType,normalized),
618
+ vp_readMatrixIndexExtraValue(offset+cs*3u,dataType,normalized)
619
+ );}
620
+ fn vp_readMatrixWeightExtraValue(byteOffset : u32,dataType : u32,normalized : bool)->f32 {return vp_convertToFloat(bitcast<u32>(matricesWeightsExtra[byteOffset/4u]),byteOffset % 4u,dataType,normalized);}
621
+ fn vp_readBoneWeightsExtra(info : vec4f,vertexIndex : u32)->vec4f {let baseOffset=u32(info.x);let stride=u32(info.y);let dataType=u32(info.z);let normalized=info.w != 0.0;let offset=baseOffset+vertexIndex*stride;let cs=vp_componentSize(dataType);return vec4f(
622
+ vp_readMatrixWeightExtraValue(offset,dataType,normalized),
623
+ vp_readMatrixWeightExtraValue(offset+cs,dataType,normalized),
624
+ vp_readMatrixWeightExtraValue(offset+cs*2u,dataType,normalized),
625
+ vp_readMatrixWeightExtraValue(offset+cs*3u,dataType,normalized)
626
+ );}
627
+ #endif
628
+ #endif
629
+ #endif
630
+ `;t.ShaderStore.IncludesShadersStoreWGSL[R]||(t.ShaderStore.IncludesShadersStoreWGSL[R]=g);let P="vertexPullingVertex",M=`#ifdef USE_VERTEX_PULLING
631
+ let vpVertexIndex: u32=vp_readVertexIndex(vertexInputs.vertexIndex);positionUpdated=vp_readPosition(uniforms.vp_position_info,vpVertexIndex);
632
+ #ifdef NORMAL
633
+ normalUpdated=vp_readNormal(uniforms.vp_normal_info,vpVertexIndex);
634
+ #endif
635
+ #ifdef TANGENT
636
+ tangentUpdated=vp_readTangent(uniforms.vp_tangent_info,vpVertexIndex);
637
+ #endif
638
+ #ifdef UV1
639
+ uvUpdated=vp_readUV(uniforms.vp_uv_info,vpVertexIndex);
640
+ #endif
641
+ #ifdef UV2
642
+ uv2Updated=vp_readUV2(uniforms.vp_uv2_info,vpVertexIndex);
643
+ #endif
644
+ #ifdef UV3
645
+ var uv3Updated: vec2f=vp_readUV3(uniforms.vp_uv3_info,vpVertexIndex);
646
+ #endif
647
+ #ifdef UV4
648
+ var uv4Updated: vec2f=vp_readUV4(uniforms.vp_uv4_info,vpVertexIndex);
649
+ #endif
650
+ #ifdef UV5
651
+ var uv5Updated: vec2f=vp_readUV5(uniforms.vp_uv5_info,vpVertexIndex);
652
+ #endif
653
+ #ifdef UV6
654
+ var uv6Updated: vec2f=vp_readUV6(uniforms.vp_uv6_info,vpVertexIndex);
655
+ #endif
656
+ #ifdef VERTEXCOLOR
657
+ colorUpdated=vp_readColor(uniforms.vp_color_info,vpVertexIndex);
658
+ #endif
659
+ #ifdef MORPHTARGETS
660
+ let vp_basePosition: vec3f=positionUpdated;
661
+ #ifdef NORMAL
662
+ let vp_baseNormal: vec3f=normalUpdated;
663
+ #endif
664
+ #ifdef TANGENT
665
+ let vp_baseTangent: vec4f=tangentUpdated;
666
+ #endif
667
+ #ifdef UV1
668
+ let vp_baseUV: vec2f=uvUpdated;
669
+ #endif
670
+ #ifdef UV2
671
+ let vp_baseUV2: vec2f=uv2Updated;
672
+ #endif
673
+ #ifdef VERTEXCOLOR
674
+ let vp_baseColor: vec4f=colorUpdated;
675
+ #endif
676
+ #endif
677
+ #if NUM_BONE_INFLUENCERS>0
678
+ var vp_matricesIndices: vec4f=vp_readBoneIndices(uniforms.vp_matricesIndices_info,vpVertexIndex);var vp_matricesWeights: vec4f=vp_readBoneWeights(uniforms.vp_matricesWeights_info,vpVertexIndex);
679
+ #if NUM_BONE_INFLUENCERS>4
680
+ var vp_matricesIndicesExtra: vec4f=vp_readBoneIndicesExtra(uniforms.vp_matricesIndicesExtra_info,vpVertexIndex);var vp_matricesWeightsExtra: vec4f=vp_readBoneWeightsExtra(uniforms.vp_matricesWeightsExtra_info,vpVertexIndex);
681
+ #endif
682
+ #endif
683
+ #endif
684
+ `;t.ShaderStore.IncludesShadersStoreWGSL[P]||(t.ShaderStore.IncludesShadersStoreWGSL[P]=M);let y="morphTargetsVertexGlobal",C=`#ifdef MORPHTARGETS
685
+ #ifdef MORPHTARGETS_TEXTURE
686
+ var vertexID : f32;
687
+ #endif
688
+ #endif
689
+ `;t.ShaderStore.IncludesShadersStoreWGSL[y]||(t.ShaderStore.IncludesShadersStoreWGSL[y]=C);let b="morphTargetsVertex",W=`#ifdef MORPHTARGETS
690
+ #ifdef MORPHTARGETS_TEXTURE
691
+ #if {X}==0
692
+ for (var i=0; i<NUM_MORPH_INFLUENCERS; i=i+1) {if (f32(i)>=uniforms.morphTargetCount) {break;}
693
+ #ifdef USE_VERTEX_PULLING
694
+ vertexID=f32(vpVertexIndex)*uniforms.morphTargetTextureInfo.x;
695
+ #else
696
+ vertexID=f32(vertexInputs.vertexIndex)*uniforms.morphTargetTextureInfo.x;
697
+ #endif
698
+ #ifdef MORPHTARGETS_POSITION
699
+ #ifdef USE_VERTEX_PULLING
700
+ positionUpdated=positionUpdated+(readVector3FromRawSampler(i,vertexID)-vp_basePosition)*uniforms.morphTargetInfluences[i];
701
+ #else
702
+ positionUpdated=positionUpdated+(readVector3FromRawSampler(i,vertexID)-vertexInputs.position)*uniforms.morphTargetInfluences[i];
703
+ #endif
704
+ #endif
705
+ #ifdef MORPHTARGETTEXTURE_HASPOSITIONS
706
+ vertexID=vertexID+1.0;
707
+ #endif
708
+ #ifdef MORPHTARGETS_NORMAL
709
+ #ifdef USE_VERTEX_PULLING
710
+ normalUpdated=normalUpdated+(readVector3FromRawSampler(i,vertexID) -vp_baseNormal)*uniforms.morphTargetInfluences[i];
711
+ #else
712
+ normalUpdated=normalUpdated+(readVector3FromRawSampler(i,vertexID) -vertexInputs.normal)*uniforms.morphTargetInfluences[i];
713
+ #endif
714
+ #endif
715
+ #ifdef MORPHTARGETTEXTURE_HASNORMALS
716
+ vertexID=vertexID+1.0;
717
+ #endif
718
+ #ifdef MORPHTARGETS_UV
719
+ #ifdef USE_VERTEX_PULLING
720
+ uvUpdated=uvUpdated+(readVector3FromRawSampler(i,vertexID).xy-vp_baseUV)*uniforms.morphTargetInfluences[i];
721
+ #else
722
+ uvUpdated=uvUpdated+(readVector3FromRawSampler(i,vertexID).xy-vertexInputs.uv)*uniforms.morphTargetInfluences[i];
723
+ #endif
724
+ #endif
725
+ #ifdef MORPHTARGETTEXTURE_HASUVS
726
+ vertexID=vertexID+1.0;
727
+ #endif
728
+ #ifdef MORPHTARGETS_TANGENT
729
+ #ifdef USE_VERTEX_PULLING
730
+ tangentUpdated=vec4f(tangentUpdated.xyz+(readVector3FromRawSampler(i,vertexID) -vp_baseTangent.xyz)*uniforms.morphTargetInfluences[i],tangentUpdated.a);
731
+ #else
732
+ tangentUpdated=vec4f(tangentUpdated.xyz+(readVector3FromRawSampler(i,vertexID) -vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[i],tangentUpdated.a);
733
+ #endif
734
+ #endif
735
+ #ifdef MORPHTARGETTEXTURE_HASTANGENTS
736
+ vertexID=vertexID+1.0;
737
+ #endif
738
+ #ifdef MORPHTARGETS_UV2
739
+ #ifdef USE_VERTEX_PULLING
740
+ uv2Updated=uv2Updated+(readVector3FromRawSampler(i,vertexID).xy-vp_baseUV2)*uniforms.morphTargetInfluences[i];
741
+ #else
742
+ uv2Updated=uv2Updated+(readVector3FromRawSampler(i,vertexID).xy-vertexInputs.uv2)*uniforms.morphTargetInfluences[i];
743
+ #endif
744
+ #endif
745
+ #ifdef MORPHTARGETS_COLOR
746
+ #ifdef USE_VERTEX_PULLING
747
+ colorUpdated=colorUpdated+(readVector4FromRawSampler(i,vertexID)-vp_baseColor)*uniforms.morphTargetInfluences[i];
748
+ #else
749
+ colorUpdated=colorUpdated+(readVector4FromRawSampler(i,vertexID)-vertexInputs.color)*uniforms.morphTargetInfluences[i];
750
+ #endif
751
+ #endif
752
+ }
753
+ #endif
754
+ #else
755
+ #ifdef MORPHTARGETS_POSITION
756
+ #ifdef USE_VERTEX_PULLING
757
+ positionUpdated=positionUpdated+(vertexInputs.position{X}-vp_basePosition)*uniforms.morphTargetInfluences[{X}];
758
+ #else
759
+ positionUpdated=positionUpdated+(vertexInputs.position{X}-vertexInputs.position)*uniforms.morphTargetInfluences[{X}];
760
+ #endif
761
+ #endif
762
+ #ifdef MORPHTARGETS_NORMAL
763
+ #ifdef USE_VERTEX_PULLING
764
+ normalUpdated=normalUpdated+(vertexInputs.normal{X}-vp_baseNormal)*uniforms.morphTargetInfluences[{X}];
765
+ #else
766
+ normalUpdated=normalUpdated+(vertexInputs.normal{X}-vertexInputs.normal)*uniforms.morphTargetInfluences[{X}];
767
+ #endif
768
+ #endif
769
+ #ifdef MORPHTARGETS_TANGENT
770
+ #ifdef USE_VERTEX_PULLING
771
+ tangentUpdated=vec4f(tangentUpdated.xyz+(vertexInputs.tangent{X}-vp_baseTangent.xyz)*uniforms.morphTargetInfluences[{X}],tangentUpdated.a);
772
+ #else
773
+ tangentUpdated=vec4f(tangentUpdated.xyz+(vertexInputs.tangent{X}-vertexInputs.tangent.xyz)*uniforms.morphTargetInfluences[{X}],tangentUpdated.a);
774
+ #endif
775
+ #endif
776
+ #ifdef MORPHTARGETS_UV
777
+ #ifdef USE_VERTEX_PULLING
778
+ uvUpdated=uvUpdated+(vertexInputs.uv_{X}-vp_baseUV)*uniforms.morphTargetInfluences[{X}];
779
+ #else
780
+ uvUpdated=uvUpdated+(vertexInputs.uv_{X}-vertexInputs.uv)*uniforms.morphTargetInfluences[{X}];
781
+ #endif
782
+ #endif
783
+ #ifdef MORPHTARGETS_UV2
784
+ #ifdef USE_VERTEX_PULLING
785
+ uv2Updated=uv2Updated+(vertexInputs.uv2_{X}-vp_baseUV2)*uniforms.morphTargetInfluences[{X}];
786
+ #else
787
+ uv2Updated=uv2Updated+(vertexInputs.uv2_{X}-vertexInputs.uv2)*uniforms.morphTargetInfluences[{X}];
788
+ #endif
789
+ #endif
790
+ #ifdef MORPHTARGETS_COLOR
791
+ #ifdef USE_VERTEX_PULLING
792
+ colorUpdated=colorUpdated+(vertexInputs.color{X}-vp_baseColor)*uniforms.morphTargetInfluences[{X}];
793
+ #else
794
+ colorUpdated=colorUpdated+(vertexInputs.color{X}-vertexInputs.color)*uniforms.morphTargetInfluences[{X}];
795
+ #endif
796
+ #endif
797
+ #endif
798
+ #endif
799
+ `;t.ShaderStore.IncludesShadersStoreWGSL[b]||(t.ShaderStore.IncludesShadersStoreWGSL[b]=W);var D=e.i(50331),F=e.i(3350),G=e.i(35845);let X="prePassVertex",z=`#ifdef PREPASS_DEPTH
800
+ vertexOutputs.vViewPos=(scene.view*worldPos).rgb;
801
+ #endif
802
+ #ifdef PREPASS_NORMALIZED_VIEW_DEPTH
803
+ vertexOutputs.vNormViewDepth=((scene.view*worldPos).z-uniforms.cameraInfo.x)/(uniforms.cameraInfo.y-uniforms.cameraInfo.x);
804
+ #endif
805
+ #ifdef PREPASS_LOCAL_POSITION
806
+ vertexOutputs.vPosition=positionUpdated.xyz;
807
+ #endif
808
+ #if (defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && defined(BONES_VELOCITY_ENABLED)
809
+ vertexOutputs.vCurrentPosition=scene.viewProjection*worldPos;
810
+ #if NUM_BONE_INFLUENCERS>0
811
+ var previousInfluence: mat4x4f;previousInfluence=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];
812
+ #if NUM_BONE_INFLUENCERS>1
813
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];
814
+ #endif
815
+ #if NUM_BONE_INFLUENCERS>2
816
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];
817
+ #endif
818
+ #if NUM_BONE_INFLUENCERS>3
819
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];
820
+ #endif
821
+ #if NUM_BONE_INFLUENCERS>4
822
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];
823
+ #endif
824
+ #if NUM_BONE_INFLUENCERS>5
825
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];
826
+ #endif
827
+ #if NUM_BONE_INFLUENCERS>6
828
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];
829
+ #endif
830
+ #if NUM_BONE_INFLUENCERS>7
831
+ previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];
832
+ #endif
833
+ vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*previousInfluence* vec4f(positionUpdated,1.0);
834
+ #else
835
+ vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);
836
+ #endif
837
+ #endif
838
+ `;t.ShaderStore.IncludesShadersStoreWGSL[X]||(t.ShaderStore.IncludesShadersStoreWGSL[X]=z);let w="uvVariableDeclaration",B=`#ifdef MAINUV{X}
839
+ #if !defined(UV{X})
840
+ var uv{X}: vec2f=vec2f(0.,0.);
841
+ #elif defined(USE_VERTEX_PULLING)
842
+ var uv{X}: vec2f=uv{X}Updated;
843
+ #else
844
+ var uv{X}: vec2f=vertexInputs.uv{X};
845
+ #endif
846
+ vertexOutputs.vMainUV{X}=uv{X};
847
+ #endif
848
+ `;t.ShaderStore.IncludesShadersStoreWGSL[w]||(t.ShaderStore.IncludesShadersStoreWGSL[w]=B);let H="samplerVertexImplementation",Y=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
849
+ if (uniforms.v_INFONAME_==0.)
850
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uvUpdated,1.0,0.0)).xy;}
851
+ #ifdef UV2
852
+ else if (uniforms.v_INFONAME_==1.)
853
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uv2Updated,1.0,0.0)).xy;}
854
+ #endif
855
+ #ifdef UV3
856
+ else if (uniforms.v_INFONAME_==2.)
857
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv3,1.0,0.0)).xy;}
858
+ #endif
859
+ #ifdef UV4
860
+ else if (uniforms.v_INFONAME_==3.)
861
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv4,1.0,0.0)).xy;}
862
+ #endif
863
+ #ifdef UV5
864
+ else if (uniforms.v_INFONAME_==4.)
865
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv5,1.0,0.0)).xy;}
866
+ #endif
867
+ #ifdef UV6
868
+ else if (uniforms.v_INFONAME_==5.)
869
+ {vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv6,1.0,0.0)).xy;}
870
+ #endif
871
+ #endif
872
+ `;t.ShaderStore.IncludesShadersStoreWGSL[H]||(t.ShaderStore.IncludesShadersStoreWGSL[H]=Y);let k="bumpVertex",j=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
873
+ #if defined(TANGENT) && defined(NORMAL)
874
+ var tbnNormal: vec3f=normalize(normalUpdated);var tbnTangent: vec3f=normalize(tangentUpdated.xyz);var tbnBitangent: vec3f=cross(tbnNormal,tbnTangent)*tangentUpdated.w;var matTemp= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz)* mat3x3f(tbnTangent,tbnBitangent,tbnNormal);vertexOutputs.vTBN0=matTemp[0];vertexOutputs.vTBN1=matTemp[1];vertexOutputs.vTBN2=matTemp[2];
875
+ #endif
876
+ #endif
877
+ `;t.ShaderStore.IncludesShadersStoreWGSL[k]||(t.ShaderStore.IncludesShadersStoreWGSL[k]=j);var q=e.i(3878),K=e.i(42893);let Z="shadowsVertex",Q=`#ifdef SHADOWS
878
+ #if defined(SHADOWCSM{X})
879
+ #ifdef SCENE_UBO
880
+ vertexOutputs.vPositionFromCamera{X}=scene.view*worldPos;
881
+ #else
882
+ vertexOutputs.vPositionFromCamera{X}=uniforms.view*worldPos;
883
+ #endif
884
+ #if SHADOWCSMNUM_CASCADES{X}>0
885
+ vertexOutputs.vPositionFromLight{X}_0=uniforms.lightMatrix{X}[0]*worldPos;
886
+ #ifdef USE_REVERSE_DEPTHBUFFER
887
+ vertexOutputs.vDepthMetric{X}_0=(-vertexOutputs.vPositionFromLight{X}_0.z+light{X}.depthValues.x)/light{X}.depthValues.y;
888
+ #else
889
+ vertexOutputs.vDepthMetric{X}_0= (vertexOutputs.vPositionFromLight{X}_0.z+light{X}.depthValues.x)/light{X}.depthValues.y;
890
+ #endif
891
+ #endif
892
+ #if SHADOWCSMNUM_CASCADES{X}>1
893
+ vertexOutputs.vPositionFromLight{X}_1=uniforms.lightMatrix{X}[1]*worldPos;
894
+ #ifdef USE_REVERSE_DEPTHBUFFER
895
+ vertexOutputs.vDepthMetric{X}_1=(-vertexOutputs.vPositionFromLight{X}_1.z+light{X}.depthValues.x)/light{X}.depthValues.y;
896
+ #else
897
+ vertexOutputs.vDepthMetric{X}_1= (vertexOutputs.vPositionFromLight{X}_1.z+light{X}.depthValues.x)/light{X}.depthValues.y;
898
+ #endif
899
+ #endif
900
+ #if SHADOWCSMNUM_CASCADES{X}>2
901
+ vertexOutputs.vPositionFromLight{X}_2=uniforms.lightMatrix{X}[2]*worldPos;
902
+ #ifdef USE_REVERSE_DEPTHBUFFER
903
+ vertexOutputs.vDepthMetric{X}_2=(-vertexOutputs.vPositionFromLight{X}_2.z+light{X}.depthValues.x)/light{X}.depthValues.y;
904
+ #else
905
+ vertexOutputs.vDepthMetric{X}_2= (vertexOutputs.vPositionFromLight{X}_2.z+light{X}.depthValues.x)/light{X}.depthValues.y;
906
+ #endif
907
+ #endif
908
+ #if SHADOWCSMNUM_CASCADES{X}>3
909
+ vertexOutputs.vPositionFromLight{X}_3=uniforms.lightMatrix{X}[3]*worldPos;
910
+ #ifdef USE_REVERSE_DEPTHBUFFER
911
+ vertexOutputs.vDepthMetric{X}_3=(-vertexOutputs.vPositionFromLight{X}_3.z+light{X}.depthValues.x)/light{X}.depthValues.y;
912
+ #else
913
+ vertexOutputs.vDepthMetric{X}_3= (vertexOutputs.vPositionFromLight{X}_3.z+light{X}.depthValues.x)/light{X}.depthValues.y;
914
+ #endif
915
+ #endif
916
+ #elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})
917
+ vertexOutputs.vPositionFromLight{X}=uniforms.lightMatrix{X}*worldPos;
918
+ #ifdef USE_REVERSE_DEPTHBUFFER
919
+ vertexOutputs.vDepthMetric{X}=(-vertexOutputs.vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
920
+ #else
921
+ vertexOutputs.vDepthMetric{X}=(vertexOutputs.vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
922
+ #endif
923
+ #endif
924
+ #endif
925
+ `;t.ShaderStore.IncludesShadersStoreWGSL[Z]||(t.ShaderStore.IncludesShadersStoreWGSL[Z]=Q);var J=e.i(8154);let $="logDepthVertex",ee=`#ifdef LOGARITHMICDEPTH
926
+ vertexOutputs.vFragmentDepth=1.0+vertexOutputs.position.w;vertexOutputs.position.z=log2(max(0.000001,vertexOutputs.vFragmentDepth))*uniforms.logarithmicDepthConstant;
927
+ #endif
928
+ `;t.ShaderStore.IncludesShadersStoreWGSL[$]||(t.ShaderStore.IncludesShadersStoreWGSL[$]=ee);let et="defaultVertexShader",er=`#include<defaultUboDeclaration>
929
+ #define CUSTOM_VERTEX_BEGIN
930
+ #ifndef USE_VERTEX_PULLING
931
+ attribute position: vec3f;
932
+ #ifdef NORMAL
933
+ attribute normal: vec3f;
934
+ #endif
935
+ #ifdef TANGENT
936
+ attribute tangent: vec4f;
937
+ #endif
938
+ #ifdef UV1
939
+ attribute uv: vec2f;
940
+ #endif
941
+ #include<uvAttributeDeclaration>[2..7]
942
+ #ifdef VERTEXCOLOR
943
+ attribute color: vec4f;
944
+ #endif
945
+ #endif
946
+ #include<helperFunctions>
947
+ #include<bonesDeclaration>
948
+ #include<bakedVertexAnimationDeclaration>
949
+ #include<instancesDeclaration>
950
+ #include<prePassVertexDeclaration>
951
+ #include<mainUVVaryingDeclaration>[1..7]
952
+ #include<samplerVertexDeclaration>(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse)
953
+ #include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)
954
+ #include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)
955
+ #include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)
956
+ #include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)
957
+ #include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)
958
+ #if defined(SPECULARTERM)
959
+ #include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular)
960
+ #endif
961
+ #include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)
962
+ #include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)
963
+ varying vPositionW: vec3f;
964
+ #ifdef NORMAL
965
+ varying vNormalW: vec3f;
966
+ #endif
967
+ #if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
968
+ varying vColor: vec4f;
969
+ #endif
970
+ #include<bumpVertexDeclaration>
971
+ #include<clipPlaneVertexDeclaration>
972
+ #include<fogVertexDeclaration>
973
+ #include<__decl__lightVxFragment>[0..maxSimultaneousLights]
974
+ #include<morphTargetsVertexGlobalDeclaration>
975
+ #include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]
976
+ #ifdef REFLECTIONMAP_SKYBOX
977
+ varying vPositionUVW: vec3f;
978
+ #endif
979
+ #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
980
+ varying vDirectionW: vec3f;
981
+ #endif
982
+ #if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0
983
+ varying vViewDepth: f32;
984
+ #endif
985
+ #include<logDepthDeclaration>
986
+ #include<vertexPullingDeclaration>
987
+ #define CUSTOM_VERTEX_DEFINITIONS
988
+ @vertex
989
+ fn main(input : VertexInputs)->FragmentInputs {
990
+ #define CUSTOM_VERTEX_MAIN_BEGIN
991
+ #ifdef USE_VERTEX_PULLING
992
+ var positionUpdated: vec3f=vec3f(0.0);
993
+ #ifdef NORMAL
994
+ var normalUpdated: vec3f=vec3f(0.0);
995
+ #endif
996
+ #ifdef TANGENT
997
+ var tangentUpdated: vec4f=vec4f(0.0);
998
+ #endif
999
+ #ifdef UV1
1000
+ var uvUpdated: vec2f=vec2f(0.0);
1001
+ #endif
1002
+ #ifdef UV2
1003
+ var uv2Updated: vec2f=vec2f(0.0);
1004
+ #endif
1005
+ #ifdef VERTEXCOLOR
1006
+ var colorUpdated: vec4f=vec4f(0.0);
1007
+ #endif
1008
+ #else
1009
+ var positionUpdated: vec3f=vertexInputs.position;
1010
+ #ifdef NORMAL
1011
+ var normalUpdated: vec3f=vertexInputs.normal;
1012
+ #endif
1013
+ #ifdef TANGENT
1014
+ var tangentUpdated: vec4f=vertexInputs.tangent;
1015
+ #endif
1016
+ #ifdef UV1
1017
+ var uvUpdated: vec2f=vertexInputs.uv;
1018
+ #endif
1019
+ #ifdef UV2
1020
+ var uv2Updated: vec2f=vertexInputs.uv2;
1021
+ #endif
1022
+ #ifdef VERTEXCOLOR
1023
+ var colorUpdated: vec4f=vertexInputs.color;
1024
+ #endif
1025
+ #endif
1026
+ #include<vertexPullingVertex>
1027
+ #include<morphTargetsVertexGlobal>
1028
+ #include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]
1029
+ #ifdef REFLECTIONMAP_SKYBOX
1030
+ vertexOutputs.vPositionUVW=positionUpdated;
1031
+ #endif
1032
+ #define CUSTOM_VERTEX_UPDATE_POSITION
1033
+ #define CUSTOM_VERTEX_UPDATE_NORMAL
1034
+ #include<instancesVertex>
1035
+ #if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)
1036
+ vertexOutputs.vCurrentPosition=scene.viewProjection*finalWorld*vec4f(positionUpdated,1.0);vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*vec4f(positionUpdated,1.0);
1037
+ #endif
1038
+ #ifdef USE_VERTEX_PULLING
1039
+ #include<bonesVertex>(vertexInputs.matricesIndices,vp_matricesIndices,vertexInputs.matricesWeights,vp_matricesWeights,vertexInputs.matricesIndicesExtra,vp_matricesIndicesExtra,vertexInputs.matricesWeightsExtra,vp_matricesWeightsExtra)
1040
+ #include<bakedVertexAnimation>(vertexInputs.matricesIndices,vp_matricesIndices,vertexInputs.matricesWeights,vp_matricesWeights,vertexInputs.matricesIndicesExtra,vp_matricesIndicesExtra,vertexInputs.matricesWeightsExtra,vp_matricesWeightsExtra)
1041
+ #else
1042
+ #include<bonesVertex>
1043
+ #include<bakedVertexAnimation>
1044
+ #endif
1045
+ var worldPos: vec4f=finalWorld*vec4f(positionUpdated,1.0);
1046
+ #ifdef NORMAL
1047
+ var normalWorld: mat3x3f= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz);
1048
+ #if defined(INSTANCES) && defined(THIN_INSTANCES)
1049
+ vertexOutputs.vNormalW=normalUpdated/ vec3f(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vertexOutputs.vNormalW=normalize(normalWorld*vertexOutputs.vNormalW);
1050
+ #else
1051
+ #ifdef NONUNIFORMSCALING
1052
+ normalWorld=transposeMat3(inverseMat3(normalWorld));
1053
+ #endif
1054
+ vertexOutputs.vNormalW=normalize(normalWorld*normalUpdated);
1055
+ #endif
1056
+ #endif
1057
+ #define CUSTOM_VERTEX_UPDATE_WORLDPOS
1058
+ #ifdef MULTIVIEW
1059
+ if (gl_ViewID_OVR==0u) {vertexOutputs.position=scene.viewProjection*worldPos;} else {vertexOutputs.position=scene.viewProjectionR*worldPos;}
1060
+ #else
1061
+ vertexOutputs.position=scene.viewProjection*worldPos;
1062
+ #endif
1063
+ vertexOutputs.vPositionW= worldPos.xyz;
1064
+ #ifdef PREPASS
1065
+ #include<prePassVertex>
1066
+ #endif
1067
+ #if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
1068
+ vertexOutputs.vDirectionW=normalize((finalWorld* vec4f(positionUpdated,0.0)).xyz);
1069
+ #endif
1070
+ #if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0
1071
+ #ifdef RIGHT_HANDED
1072
+ vertexOutputs.vViewDepth=-(scene.view*worldPos).z;
1073
+ #else
1074
+ vertexOutputs.vViewDepth=(scene.view*worldPos).z;
1075
+ #endif
1076
+ #endif
1077
+ #ifndef UV1
1078
+ var uvUpdated: vec2f=vec2f(0.,0.);
1079
+ #endif
1080
+ #ifdef MAINUV1
1081
+ vertexOutputs.vMainUV1=uvUpdated;
1082
+ #endif
1083
+ #ifndef UV2
1084
+ var uv2Updated: vec2f=vec2f(0.,0.);
1085
+ #endif
1086
+ #ifdef MAINUV2
1087
+ vertexOutputs.vMainUV2=uv2Updated;
1088
+ #endif
1089
+ #include<uvVariableDeclaration>[3..7]
1090
+ #include<samplerVertexImplementation>(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse,_MATRIXNAME_,diffuse,_INFONAME_,DiffuseInfos.x)
1091
+ #include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)
1092
+ #include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)
1093
+ #include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)
1094
+ #include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)
1095
+ #include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)
1096
+ #if defined(SPECULARTERM)
1097
+ #include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular,_MATRIXNAME_,specular,_INFONAME_,SpecularInfos.x)
1098
+ #endif
1099
+ #include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)
1100
+ #include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)
1101
+ #include<bumpVertex>
1102
+ #include<clipPlaneVertex>
1103
+ #include<fogVertex>
1104
+ #include<shadowsVertex>[0..maxSimultaneousLights]
1105
+ #include<vertexColorMixing>
1106
+ #include<logDepthVertex>
1107
+ #define CUSTOM_VERTEX_MAIN_END
1108
+ }
1109
+ `;for(let e of(t.ShaderStore.ShadersStoreWGSL[et]||(t.ShaderStore.ShadersStoreWGSL[et]=er),[r.sceneUboDeclarationWGSL,i.meshUboDeclarationWGSL,n.defaultUboDeclarationWGSL,{name:a,shader:f},o.helperFunctionsWGSL,d.bonesDeclarationWGSL,s.bakedVertexAnimationDeclarationWGSL,u.instancesDeclarationWGSL,{name:l,shader:v},c.mainUVVaryingDeclarationWGSL,{name:m,shader:p},{name:x,shader:S},E.clipPlaneVertexDeclarationWGSL,I.fogVertexDeclarationWGSL,{name:_,shader:T},{name:N,shader:V},{name:h,shader:A},{name:U,shader:L},O.logDepthDeclarationWGSL,{name:R,shader:g},{name:P,shader:M},{name:y,shader:C},{name:b,shader:W},D.instancesVertexWGSL,F.bonesVertexWGSL,G.bakedVertexAnimationWGSL,{name:X,shader:z},{name:w,shader:B},{name:H,shader:Y},{name:k,shader:j},q.clipPlaneVertexWGSL,K.fogVertexWGSL,{name:Z,shader:Q},J.vertexColorMixingWGSL,{name:$,shader:ee}]))t.ShaderStore.IncludesShadersStoreWGSL[e.name]||(t.ShaderStore.IncludesShadersStoreWGSL[e.name]=e.shader);e.s(["defaultVertexShaderWGSL",0,{name:et,shader:er}],14610)}]);