@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.
- package/LICENSE +201 -0
- package/README.md +76 -0
- package/out/404.html +1 -0
- package/out/__next.__PAGE__.txt +9 -0
- package/out/__next._full.txt +20 -0
- package/out/__next._head.txt +6 -0
- package/out/__next._index.txt +5 -0
- package/out/__next._tree.txt +4 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_buildManifest.js +11 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_clientMiddlewareManifest.js +1 -0
- package/out/_next/static/93W3szqylNKDg-afLRmVW/_ssgManifest.js +1 -0
- package/out/_next/static/chunks/0-2y-_oomza2l.js +87 -0
- package/out/_next/static/chunks/00k_j_r7bv_eb.js +266 -0
- package/out/_next/static/chunks/00zdau6mcqeae.js +1 -0
- package/out/_next/static/chunks/023axeoslq39i.js +1 -0
- package/out/_next/static/chunks/068j6934u8j16.js +1 -0
- package/out/_next/static/chunks/0_rf76jneiwal.js +176 -0
- package/out/_next/static/chunks/0aznt7717miff.js +1 -0
- package/out/_next/static/chunks/0cu-q5q3a7uf3.js +1 -0
- package/out/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- package/out/_next/static/chunks/0dm32-jq30tg8.js +1 -0
- package/out/_next/static/chunks/0dn0yx0rn6mpf.js +1 -0
- package/out/_next/static/chunks/0flc7nppbmsl1.js +3 -0
- package/out/_next/static/chunks/0fskcfh9vbhtv.js +1 -0
- package/out/_next/static/chunks/0gv7mblzv3dl3.js +87 -0
- package/out/_next/static/chunks/0impkpmxx3ttp.js +1 -0
- package/out/_next/static/chunks/0jmn7u31w95ly.js +91 -0
- package/out/_next/static/chunks/0n8n481szj90g.js +1 -0
- package/out/_next/static/chunks/0o6ayai0s01js.js +1 -0
- package/out/_next/static/chunks/0rys92_73hdb0.js +22 -0
- package/out/_next/static/chunks/0tl_moiyi2txt.js +1 -0
- package/out/_next/static/chunks/0tx1j_ghpz7rc.css +3 -0
- package/out/_next/static/chunks/0ufbyo1x3qkmo.js +1 -0
- package/out/_next/static/chunks/0v82oqyoy9zol.js +1 -0
- package/out/_next/static/chunks/0wrm9jr-9bw0e.js +1893 -0
- package/out/_next/static/chunks/0wwcfw8i3j_zx.js +1 -0
- package/out/_next/static/chunks/0ys9-ozuluawt.js +1 -0
- package/out/_next/static/chunks/1-61zh4waha61.js +1 -0
- package/out/_next/static/chunks/10r_824wzt8hj.js +1 -0
- package/out/_next/static/chunks/112hws17nz665.js +7 -0
- package/out/_next/static/chunks/123xxske5c9na.js +1 -0
- package/out/_next/static/chunks/13isnf0--pmx1.js +1 -0
- package/out/_next/static/chunks/157d9euci08yu.js +1 -0
- package/out/_next/static/chunks/15s7425ffrec9.js +3 -0
- package/out/_next/static/chunks/163fa70v4mgxj.js +1 -0
- package/out/_next/static/chunks/17q0c2h5ui10r.js +4 -0
- package/out/_next/static/chunks/18u58lorfahxi.js +4 -0
- package/out/_next/static/chunks/1_aahautsz2v_.js +1 -0
- package/out/_next/static/chunks/1a9l89j7e6mqu.js +23 -0
- package/out/_next/static/chunks/1dsy2ngmfflis.js +123 -0
- package/out/_next/static/chunks/1flb8adpj6_2o.js +62 -0
- package/out/_next/static/chunks/1lsg-22yob8dx.js +1 -0
- package/out/_next/static/chunks/1nj82er7msdto.js +2 -0
- package/out/_next/static/chunks/1o1d0p-v1z8ty.js +1 -0
- package/out/_next/static/chunks/1pdep2_c530sg.js +1 -0
- package/out/_next/static/chunks/1thjncpj7u6pq.js +1 -0
- package/out/_next/static/chunks/1vdjn0pkoyypn.js +1 -0
- package/out/_next/static/chunks/1yehxf-fmeicg.js +1 -0
- package/out/_next/static/chunks/1zvc1tv--w8nn.js +1 -0
- package/out/_next/static/chunks/1zx2q-r32thv1.js +4 -0
- package/out/_next/static/chunks/2-sjjedfr0kfq.js +1 -0
- package/out/_next/static/chunks/21o42k82w4llc.js +1 -0
- package/out/_next/static/chunks/25b9x-li-tvk2.js +1 -0
- package/out/_next/static/chunks/2712627rfsmwn.js +1 -0
- package/out/_next/static/chunks/296w2ke-v5tbm.js +9 -0
- package/out/_next/static/chunks/29tfeb6amdkjb.js +23 -0
- package/out/_next/static/chunks/2a3spdq-m8drh.js +3 -0
- package/out/_next/static/chunks/2aelw3far6rii.js +1 -0
- package/out/_next/static/chunks/2aor7m-wbis85.js +1 -0
- package/out/_next/static/chunks/2cbmf9m7lqv6k.js +4 -0
- package/out/_next/static/chunks/2d09v5u7dfq0q.js +1 -0
- package/out/_next/static/chunks/2feca0xcipcyt.js +850 -0
- package/out/_next/static/chunks/2fh-_9b6tqhvb.js +1 -0
- package/out/_next/static/chunks/2g5gecypj0rqe.js +1 -0
- package/out/_next/static/chunks/2kazjq29jeamx.js +1109 -0
- package/out/_next/static/chunks/2p2vv6cc9i-3q.js +255 -0
- package/out/_next/static/chunks/2szdcpl41-kzv.js +1 -0
- package/out/_next/static/chunks/2tws5udjdcmh3.js +1 -0
- package/out/_next/static/chunks/2u6shh3oeycm-.js +1 -0
- package/out/_next/static/chunks/2unhhuv0arlcv.js +1 -0
- package/out/_next/static/chunks/2xwy0-qfho1iz.js +91 -0
- package/out/_next/static/chunks/2ycvtdd68gub7.js +1 -0
- package/out/_next/static/chunks/2yiy_l8bwiw2_.js +3 -0
- package/out/_next/static/chunks/2yph6f7khgqii.js +1 -0
- package/out/_next/static/chunks/3-shckrcpvbxu.js +1681 -0
- package/out/_next/static/chunks/30fq_t9e2_fv-.js +1 -0
- package/out/_next/static/chunks/30yzu213bqtq0.js +5 -0
- package/out/_next/static/chunks/310uz81hnnzsu.js +1 -0
- package/out/_next/static/chunks/3218lp8l0a5g_.js +1 -0
- package/out/_next/static/chunks/35h5n42wxwgzk.js +123 -0
- package/out/_next/static/chunks/37vzwr3ciejf1.js +1 -0
- package/out/_next/static/chunks/38fhw7fatsyvd.js +3 -0
- package/out/_next/static/chunks/3be6s4_kn9q-o.js +1 -0
- package/out/_next/static/chunks/3i3gbhccmhu7j.js +210 -0
- package/out/_next/static/chunks/3l1dr_qm_x5kp.js +1 -0
- package/out/_next/static/chunks/3mqy-84_ul3t2.js +1 -0
- package/out/_next/static/chunks/3nz-dh9d7cehk.js +1 -0
- package/out/_next/static/chunks/3pufs8g4ui943.js +1 -0
- package/out/_next/static/chunks/3sjq_xoi4rbyg.js +31 -0
- package/out/_next/static/chunks/3t06schbtqonl.js +1 -0
- package/out/_next/static/chunks/3v3-7fio3nw_t.js +1 -0
- package/out/_next/static/chunks/3v5ha25nxo43j.js +1 -0
- package/out/_next/static/chunks/3yfrsm8lfi6ls.js +22 -0
- package/out/_next/static/chunks/3zskk1hxu3-_o.js +1 -0
- package/out/_next/static/chunks/turbopack-2ropzf0axp1x9.js +1 -0
- package/out/_next/static/media/0c89a48fa5027cee-s.p.2cyn07wtgehh0.woff2 +0 -0
- package/out/_next/static/media/13bf9871fe164e7f-s.2f7nqdagzwx2-.woff2 +0 -0
- package/out/_next/static/media/28868e710e86be81-s.2eksvhm1z0jwa.woff2 +0 -0
- package/out/_next/static/media/32687112bd2dd8db-s.1gepa_7fcx9fm.woff2 +0 -0
- package/out/_next/static/media/3fe682a82f50d426-s.0vfdmo25voy_0.woff2 +0 -0
- package/out/_next/static/media/70bc3e132a0a741e-s.p.3t6q91iet4nsy.woff2 +0 -0
- package/out/_next/static/media/71b036adf157cdcf-s.0bp8oijd_gu96.woff2 +0 -0
- package/out/_next/static/media/89b21bb081cb7469-s.1fby2rem9ngyr.woff2 +0 -0
- package/out/_next/static/media/cc545e633e20c56d-s.176arc174-8zp.woff2 +0 -0
- package/out/_next/static/media/icon.08h29dad3pcxg.svg +4 -0
- package/out/_not-found/__next._full.txt +16 -0
- package/out/_not-found/__next._head.txt +6 -0
- package/out/_not-found/__next._index.txt +5 -0
- package/out/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/out/_not-found/__next._not-found.txt +5 -0
- package/out/_not-found/__next._tree.txt +2 -0
- package/out/_not-found.html +1 -0
- package/out/_not-found.txt +16 -0
- package/out/api/projects +1 -0
- package/out/icon.svg +4 -0
- package/out/index.html +1 -0
- package/out/index.txt +20 -0
- package/out/logo.svg +46 -0
- package/package.json +67 -0
- package/server/standalone.mjs +182 -0
|
@@ -0,0 +1,850 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65296,e=>{"use strict";var i=e.i(12423);let r="helperFunctions",t=`const float PI=3.1415926535897932384626433832795;const float TWO_PI=6.283185307179586;const float HALF_PI=1.5707963267948966;const float RECIPROCAL_PI=0.3183098861837907;const float RECIPROCAL_PI2=0.15915494309189535;const float RECIPROCAL_PI4=0.07957747154594767;const float HALF_MIN=5.96046448e-08;
|
|
2
|
+
const float LinearEncodePowerApprox=2.2;const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);const float Epsilon=0.0000001;
|
|
3
|
+
#define saturate(x) clamp(x,0.0,1.0)
|
|
4
|
+
#define absEps(x) abs(x)+Epsilon
|
|
5
|
+
#define maxEps(x) max(x,Epsilon)
|
|
6
|
+
#define saturateEps(x) clamp(x,Epsilon,1.0)
|
|
7
|
+
mat3 transposeMat3(mat3 inMatrix) {vec3 i0=inMatrix[0];vec3 i1=inMatrix[1];vec3 i2=inMatrix[2];mat3 outMatrix=mat3(
|
|
8
|
+
vec3(i0.x,i1.x,i2.x),
|
|
9
|
+
vec3(i0.y,i1.y,i2.y),
|
|
10
|
+
vec3(i0.z,i1.z,i2.z)
|
|
11
|
+
);return outMatrix;}
|
|
12
|
+
mat3 inverseMat3(mat3 inMatrix) {float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2];float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2];float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2];float b01=a22*a11-a12*a21;float b11=-a22*a10+a12*a20;float b21=a21*a10-a11*a20;float det=a00*b01+a01*b11+a02*b21;return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),
|
|
13
|
+
b11,(a22*a00-a02*a20),(-a12*a00+a02*a10),
|
|
14
|
+
b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;}
|
|
15
|
+
#if USE_EXACT_SRGB_CONVERSIONS
|
|
16
|
+
vec3 toLinearSpaceExact(vec3 color)
|
|
17
|
+
{vec3 nearZeroSection=0.0773993808*color;vec3 remainingSection=pow(0.947867299*(color+vec3(0.055)),vec3(2.4));
|
|
18
|
+
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
|
|
19
|
+
return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3(0.04045)));
|
|
20
|
+
#else
|
|
21
|
+
return
|
|
22
|
+
vec3(
|
|
23
|
+
color.r<=0.04045 ? nearZeroSection.r : remainingSection.r,
|
|
24
|
+
color.g<=0.04045 ? nearZeroSection.g : remainingSection.g,
|
|
25
|
+
color.b<=0.04045 ? nearZeroSection.b : remainingSection.b);
|
|
26
|
+
#endif
|
|
27
|
+
}
|
|
28
|
+
vec3 toGammaSpaceExact(vec3 color)
|
|
29
|
+
{vec3 nearZeroSection=12.92*color;vec3 remainingSection=1.055*pow(color,vec3(0.41666))-vec3(0.055);
|
|
30
|
+
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
|
|
31
|
+
return mix(remainingSection,nearZeroSection,lessThanEqual(color,vec3(0.0031308)));
|
|
32
|
+
#else
|
|
33
|
+
return
|
|
34
|
+
vec3(
|
|
35
|
+
color.r<=0.0031308 ? nearZeroSection.r : remainingSection.r,
|
|
36
|
+
color.g<=0.0031308 ? nearZeroSection.g : remainingSection.g,
|
|
37
|
+
color.b<=0.0031308 ? nearZeroSection.b : remainingSection.b);
|
|
38
|
+
#endif
|
|
39
|
+
}
|
|
40
|
+
#endif
|
|
41
|
+
float toLinearSpace(float color)
|
|
42
|
+
{
|
|
43
|
+
#if USE_EXACT_SRGB_CONVERSIONS
|
|
44
|
+
float nearZeroSection=0.0773993808*color;float remainingSection=pow(0.947867299*(color+0.055),2.4);return color<=0.04045 ? nearZeroSection : remainingSection;
|
|
45
|
+
#else
|
|
46
|
+
return pow(color,LinearEncodePowerApprox);
|
|
47
|
+
#endif
|
|
48
|
+
}
|
|
49
|
+
vec3 toLinearSpace(vec3 color)
|
|
50
|
+
{
|
|
51
|
+
#if USE_EXACT_SRGB_CONVERSIONS
|
|
52
|
+
return toLinearSpaceExact(color);
|
|
53
|
+
#else
|
|
54
|
+
return pow(color,vec3(LinearEncodePowerApprox));
|
|
55
|
+
#endif
|
|
56
|
+
}
|
|
57
|
+
vec4 toLinearSpace(vec4 color)
|
|
58
|
+
{
|
|
59
|
+
#if USE_EXACT_SRGB_CONVERSIONS
|
|
60
|
+
return vec4(toLinearSpaceExact(color.rgb),color.a);
|
|
61
|
+
#else
|
|
62
|
+
return vec4(pow(color.rgb,vec3(LinearEncodePowerApprox)),color.a);
|
|
63
|
+
#endif
|
|
64
|
+
}
|
|
65
|
+
float toGammaSpace(float color)
|
|
66
|
+
{
|
|
67
|
+
#if USE_EXACT_SRGB_CONVERSIONS
|
|
68
|
+
float nearZeroSection=12.92*color;float remainingSection=1.055*pow(color,0.41666)-0.055;return color<=0.0031308 ? nearZeroSection : remainingSection;
|
|
69
|
+
#else
|
|
70
|
+
return pow(color,GammaEncodePowerApprox);
|
|
71
|
+
#endif
|
|
72
|
+
}
|
|
73
|
+
vec3 toGammaSpace(vec3 color)
|
|
74
|
+
{
|
|
75
|
+
#if USE_EXACT_SRGB_CONVERSIONS
|
|
76
|
+
return toGammaSpaceExact(color);
|
|
77
|
+
#else
|
|
78
|
+
return pow(color,vec3(GammaEncodePowerApprox));
|
|
79
|
+
#endif
|
|
80
|
+
}
|
|
81
|
+
vec4 toGammaSpace(vec4 color)
|
|
82
|
+
{
|
|
83
|
+
#if USE_EXACT_SRGB_CONVERSIONS
|
|
84
|
+
return vec4(toGammaSpaceExact(color.rgb),color.a);
|
|
85
|
+
#else
|
|
86
|
+
return vec4(pow(color.rgb,vec3(GammaEncodePowerApprox)),color.a);
|
|
87
|
+
#endif
|
|
88
|
+
}
|
|
89
|
+
float square(float value)
|
|
90
|
+
{return value*value;}
|
|
91
|
+
vec3 square(vec3 value)
|
|
92
|
+
{return value*value;}
|
|
93
|
+
float pow5(float value) {float sq=value*value;return sq*sq*value;}
|
|
94
|
+
vec3 double_refract(vec3 I,vec3 N,float eta) {vec3 Tfront=refract(I,N,1.0/eta);vec3 Nback=normalize(reflect(N,Tfront));return refract(Tfront,-Nback,eta);}
|
|
95
|
+
float getLuminanceUnclamped(vec3 color)
|
|
96
|
+
{return dot(color,LuminanceEncodeApprox);}
|
|
97
|
+
float getLuminance(vec3 color)
|
|
98
|
+
{return saturate(getLuminanceUnclamped(color));}
|
|
99
|
+
float getRand(vec2 seed) {return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453);}
|
|
100
|
+
float dither(vec2 seed,float varianceAmount) {float rand=getRand(seed);float normVariance=varianceAmount/255.0;float dither=mix(-normVariance,normVariance,rand);return dither;}
|
|
101
|
+
const float rgbdMaxRange=255.;vec4 toRGBD(vec3 color) {float maxRGB=maxEps(max(color.r,max(color.g,color.b)));float D =max(rgbdMaxRange/maxRGB,1.);D =saturate(floor(D)/255.);vec3 rgb=color.rgb*D;rgb=toGammaSpace(rgb);return vec4(saturate(rgb),D);}
|
|
102
|
+
vec3 fromRGBD(vec4 rgbd) {rgbd.rgb=toLinearSpace(rgbd.rgb);return rgbd.rgb/rgbd.a;}
|
|
103
|
+
vec3 parallaxCorrectNormal( vec3 vertexPos,vec3 origVec,vec3 cubeSize,vec3 cubePos ) {vec3 invOrigVec=vec3(1.)/origVec;vec3 halfSize=cubeSize*0.5;vec3 intersecAtMaxPlane=(cubePos+halfSize-vertexPos)*invOrigVec;vec3 intersecAtMinPlane=(cubePos-halfSize-vertexPos)*invOrigVec;vec3 largestIntersec=max(intersecAtMaxPlane,intersecAtMinPlane);float distance=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);vec3 intersectPositionWS=vertexPos+origVec*distance;return intersectPositionWS-cubePos;}
|
|
104
|
+
vec3 equirectangularToCubemapDirection(vec2 uv) {float longitude=uv.x*TWO_PI-PI;float latitude=HALF_PI-uv.y*PI;vec3 direction;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}
|
|
105
|
+
float sqrtClamped(float value) {return sqrt(max(value,0.));}
|
|
106
|
+
float avg(vec3 value) {return dot(value,vec3(0.333333333));}
|
|
107
|
+
#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)
|
|
108
|
+
uint extractBits(uint value,int offset,int width) {return (value>>offset) & ((1u<<width)-1u);}
|
|
109
|
+
int onlyBitPosition(uint value) {return (floatBitsToInt(float(value))>>23)-0x7f;}
|
|
110
|
+
vec3 singleScatterToMultiScatterAlbedo(vec3 rho_ss) {vec3 s=sqrt(max(vec3(1.0)-rho_ss,vec3(0.0)));return (vec3(1.0)-s)*(vec3(1.0)-vec3(0.139)*s)/(vec3(1.0)+vec3(1.17)*s);}
|
|
111
|
+
vec3 multiScatterToSingleScatterAlbedo(vec3 rho_ms) {vec3 s=4.09712+4.20863*rho_ms-sqrt(9.59217+41.6808*rho_ms+17.7126*rho_ms*rho_ms);return 1.0-s*s;}
|
|
112
|
+
vec3 multiScatterToSingleScatterAlbedo(vec3 rho_ms,float aniso) {vec3 s=4.09712+4.20863*rho_ms-sqrt(9.59217+41.6808*rho_ms+17.7126*rho_ms*rho_ms);return (1.0-s*s)/maxEps(1.0-aniso*s*s);}
|
|
113
|
+
float min3(vec3 v) {return min(v.x,min(v.y,v.z));}
|
|
114
|
+
float max3(vec3 v) {return max(v.x,max(v.y,v.z));}
|
|
115
|
+
float uint2float(uint i) {return uintBitsToFloat(0x3F800000u | (i>>9u))-1.0;}
|
|
116
|
+
vec2 plasticSequence(const uint rstate) {return vec2(uint2float(rstate*3242174889u),
|
|
117
|
+
uint2float(rstate*2447445414u));}
|
|
118
|
+
#endif
|
|
119
|
+
`;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["helperFunctions",0,{name:r,shader:t}])},85668,6232,44661,92692,97226,e=>{"use strict";var i=e.i(12423);let r="sceneUboDeclaration",t=`layout(std140,column_major) uniform;uniform Scene {mat4 viewProjection;
|
|
120
|
+
#ifdef MULTIVIEW
|
|
121
|
+
mat4 viewProjectionR;
|
|
122
|
+
#endif
|
|
123
|
+
mat4 view;mat4 projection;vec4 vEyePosition;mat4 inverseProjection;};
|
|
124
|
+
`;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["sceneUboDeclaration",0,{name:r,shader:t}],85668);let a="meshUboDeclaration",n=`#ifdef WEBGL2
|
|
125
|
+
uniform mat4 world;uniform float visibility;
|
|
126
|
+
#else
|
|
127
|
+
layout(std140,column_major) uniform;uniform Mesh
|
|
128
|
+
{mat4 world;float visibility;};
|
|
129
|
+
#endif
|
|
130
|
+
#define WORLD_UBO
|
|
131
|
+
`;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["meshUboDeclaration",0,{name:a,shader:n}],6232);let o="defaultUboDeclaration",d=`layout(std140,column_major) uniform;uniform Material
|
|
132
|
+
{vec4 diffuseLeftColor;vec4 diffuseRightColor;vec4 opacityParts;vec4 reflectionLeftColor;vec4 reflectionRightColor;vec4 refractionLeftColor;vec4 refractionRightColor;vec4 emissiveLeftColor;vec4 emissiveRightColor;vec2 vDiffuseInfos;vec2 vAmbientInfos;vec2 vOpacityInfos;vec2 vEmissiveInfos;vec2 vLightmapInfos;vec2 vSpecularInfos;vec3 vBumpInfos;mat4 diffuseMatrix;mat4 ambientMatrix;mat4 opacityMatrix;mat4 emissiveMatrix;mat4 lightmapMatrix;mat4 specularMatrix;mat4 bumpMatrix;vec2 vTangentSpaceParams;float pointSize;float alphaCutOff;mat4 refractionMatrix;vec4 vRefractionInfos;vec3 vRefractionPosition;vec3 vRefractionSize;vec4 vSpecularColor;vec3 vEmissiveColor;vec4 vDiffuseColor;vec3 vAmbientColor;vec4 cameraInfo;vec4 vTextureRepetitionHexTilingParams;vec2 vReflectionInfos;mat4 reflectionMatrix;vec3 vReflectionPosition;vec3 vReflectionSize;
|
|
133
|
+
#define ADDITIONAL_UBO_DECLARATION
|
|
134
|
+
};
|
|
135
|
+
#include<sceneUboDeclaration>
|
|
136
|
+
#include<meshUboDeclaration>
|
|
137
|
+
`;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["defaultUboDeclaration",0,{name:o,shader:d}],44661);let f="mainUVVaryingDeclaration",c=`#ifdef MAINUV{X}
|
|
138
|
+
varying vec2 vMainUV{X};
|
|
139
|
+
#endif
|
|
140
|
+
`;i.ShaderStore.IncludesShadersStore[f]||(i.ShaderStore.IncludesShadersStore[f]=c),e.s(["mainUVVaryingDeclaration",0,{name:f,shader:c}],92692);let l="logDepthDeclaration",s=`#ifdef LOGARITHMICDEPTH
|
|
141
|
+
uniform float logarithmicDepthConstant;varying float vFragmentDepth;
|
|
142
|
+
#endif
|
|
143
|
+
`;i.ShaderStore.IncludesShadersStore[l]||(i.ShaderStore.IncludesShadersStore[l]=s),e.s(["logDepthDeclaration",0,{name:l,shader:s}],97226)},39067,15420,e=>{"use strict";var i=e.i(12423);let r="bonesDeclaration",t=`#if NUM_BONE_INFLUENCERS>0
|
|
144
|
+
attribute vec4 matricesIndices;attribute vec4 matricesWeights;
|
|
145
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
146
|
+
attribute vec4 matricesIndicesExtra;attribute vec4 matricesWeightsExtra;
|
|
147
|
+
#endif
|
|
148
|
+
#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
149
|
+
#ifdef BONETEXTURE
|
|
150
|
+
uniform highp sampler2D boneSampler;uniform vec2 boneTextureInfo;
|
|
151
|
+
#else
|
|
152
|
+
uniform mat4 mBones[BonesPerMesh];
|
|
153
|
+
#endif
|
|
154
|
+
#ifdef BONES_VELOCITY_ENABLED
|
|
155
|
+
uniform mat4 mPreviousBones[BonesPerMesh];
|
|
156
|
+
#endif
|
|
157
|
+
#ifdef BONETEXTURE
|
|
158
|
+
#define inline
|
|
159
|
+
mat4 readMatrixFromRawSampler(sampler2D smp,float index)
|
|
160
|
+
{
|
|
161
|
+
#if defined(WEBGL2) || defined(WEBGPU)
|
|
162
|
+
int offset=int(index)*4;
|
|
163
|
+
int textureWidth=int(boneTextureInfo.x);int y=int(offset)/textureWidth;int x=int(offset) % textureWidth;vec4 m0=texelFetch(smp,ivec2(x+0,y),0);vec4 m1=texelFetch(smp,ivec2(x+1,y),0);vec4 m2=texelFetch(smp,ivec2(x+2,y),0);vec4 m3=texelFetch(smp,ivec2(x+3,y),0);return mat4(m0,m1,m2,m3);
|
|
164
|
+
#else
|
|
165
|
+
float offset=index*4.0;float y=floor(offset/boneTextureInfo.x);float x=offset-y*boneTextureInfo.x;float dy=1.0/boneTextureInfo.y;float dx=1.0/boneTextureInfo.x;vec4 m0=texture2D(smp,vec2(dx*(x+0.5),dy*(y+0.5)));vec4 m1=texture2D(smp,vec2(dx*(x+1.5),dy*(y+0.5)));vec4 m2=texture2D(smp,vec2(dx*(x+2.5),dy*(y+0.5)));vec4 m3=texture2D(smp,vec2(dx*(x+3.5),dy*(y+0.5)));
|
|
166
|
+
return mat4(m0,m1,m2,m3);
|
|
167
|
+
#endif
|
|
168
|
+
}
|
|
169
|
+
#endif
|
|
170
|
+
#endif
|
|
171
|
+
#endif
|
|
172
|
+
`;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["bonesDeclaration",0,{name:r,shader:t}],39067);let a="bakedVertexAnimationDeclaration",n=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
173
|
+
uniform float bakedVertexAnimationTime;
|
|
174
|
+
#if !defined(WEBGL2) && !defined(WEBGPU)
|
|
175
|
+
uniform vec2 bakedVertexAnimationTextureSizeInverted;
|
|
176
|
+
#endif
|
|
177
|
+
uniform vec4 bakedVertexAnimationSettings;uniform sampler2D bakedVertexAnimationTexture;
|
|
178
|
+
#ifdef INSTANCES
|
|
179
|
+
attribute vec4 bakedVertexAnimationSettingsInstanced;
|
|
180
|
+
#endif
|
|
181
|
+
#define inline
|
|
182
|
+
mat4 readMatrixFromRawSamplerVAT(sampler2D smp,float index,float frame)
|
|
183
|
+
{
|
|
184
|
+
#if defined(WEBGL2) || defined(WEBGPU)
|
|
185
|
+
int offset=int(index)*4;int frameUV=int(frame);vec4 m0=texelFetch(smp,ivec2(offset+0,frameUV),0);vec4 m1=texelFetch(smp,ivec2(offset+1,frameUV),0);vec4 m2=texelFetch(smp,ivec2(offset+2,frameUV),0);vec4 m3=texelFetch(smp,ivec2(offset+3,frameUV),0);return mat4(m0,m1,m2,m3);
|
|
186
|
+
#else
|
|
187
|
+
float offset=index*4.0;float frameUV=(frame+0.5)*bakedVertexAnimationTextureSizeInverted.y;float dx=bakedVertexAnimationTextureSizeInverted.x;vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),frameUV));vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),frameUV));vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),frameUV));vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),frameUV));return mat4(m0,m1,m2,m3);
|
|
188
|
+
#endif
|
|
189
|
+
}
|
|
190
|
+
#endif
|
|
191
|
+
`;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["bakedVertexAnimationDeclaration",0,{name:a,shader:n}],15420)},85863,e=>{"use strict";var i=e.i(12423);let r="instancesDeclaration",t=`#ifdef INSTANCES
|
|
192
|
+
attribute vec4 world0;attribute vec4 world1;attribute vec4 world2;attribute vec4 world3;
|
|
193
|
+
#ifdef INSTANCESCOLOR
|
|
194
|
+
attribute vec4 instanceColor;
|
|
195
|
+
#endif
|
|
196
|
+
#if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
|
|
197
|
+
uniform mat4 world;
|
|
198
|
+
#endif
|
|
199
|
+
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
200
|
+
attribute vec4 previousWorld0;attribute vec4 previousWorld1;attribute vec4 previousWorld2;attribute vec4 previousWorld3;
|
|
201
|
+
#ifdef THIN_INSTANCES
|
|
202
|
+
uniform mat4 previousWorld;
|
|
203
|
+
#endif
|
|
204
|
+
#endif
|
|
205
|
+
#else
|
|
206
|
+
#if !defined(WORLD_UBO)
|
|
207
|
+
uniform mat4 world;
|
|
208
|
+
#endif
|
|
209
|
+
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
210
|
+
uniform mat4 previousWorld;
|
|
211
|
+
#endif
|
|
212
|
+
#endif
|
|
213
|
+
`;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["instancesDeclaration",0,{name:r,shader:t}])},42927,57828,e=>{"use strict";var i=e.i(12423);let r="clipPlaneVertexDeclaration",t=`#ifdef CLIPPLANE
|
|
214
|
+
uniform vec4 vClipPlane;varying float fClipDistance;
|
|
215
|
+
#endif
|
|
216
|
+
#ifdef CLIPPLANE2
|
|
217
|
+
uniform vec4 vClipPlane2;varying float fClipDistance2;
|
|
218
|
+
#endif
|
|
219
|
+
#ifdef CLIPPLANE3
|
|
220
|
+
uniform vec4 vClipPlane3;varying float fClipDistance3;
|
|
221
|
+
#endif
|
|
222
|
+
#ifdef CLIPPLANE4
|
|
223
|
+
uniform vec4 vClipPlane4;varying float fClipDistance4;
|
|
224
|
+
#endif
|
|
225
|
+
#ifdef CLIPPLANE5
|
|
226
|
+
uniform vec4 vClipPlane5;varying float fClipDistance5;
|
|
227
|
+
#endif
|
|
228
|
+
#ifdef CLIPPLANE6
|
|
229
|
+
uniform vec4 vClipPlane6;varying float fClipDistance6;
|
|
230
|
+
#endif
|
|
231
|
+
`;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["clipPlaneVertexDeclaration",0,{name:r,shader:t}],42927);let a="fogVertexDeclaration",n=`#ifdef FOG
|
|
232
|
+
varying vec3 vFogDistance;
|
|
233
|
+
#endif
|
|
234
|
+
`;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["fogVertexDeclaration",0,{name:a,shader:n}],57828)},40805,30667,76955,16607,29231,17464,e=>{"use strict";var i=e.i(12423);let r="instancesVertex",t=`#ifdef INSTANCES
|
|
235
|
+
mat4 finalWorld=mat4(world0,world1,world2,world3);
|
|
236
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
237
|
+
mat4 finalPreviousWorld=mat4(previousWorld0,previousWorld1,
|
|
238
|
+
previousWorld2,previousWorld3);
|
|
239
|
+
#endif
|
|
240
|
+
#ifdef THIN_INSTANCES
|
|
241
|
+
finalWorld=world*finalWorld;
|
|
242
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
243
|
+
finalPreviousWorld=previousWorld*finalPreviousWorld;
|
|
244
|
+
#endif
|
|
245
|
+
#endif
|
|
246
|
+
#else
|
|
247
|
+
mat4 finalWorld=world;
|
|
248
|
+
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
249
|
+
mat4 finalPreviousWorld=previousWorld;
|
|
250
|
+
#endif
|
|
251
|
+
#endif
|
|
252
|
+
`;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["instancesVertex",0,{name:r,shader:t}],40805);let a="bonesVertex",n=`#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
253
|
+
#if NUM_BONE_INFLUENCERS>0
|
|
254
|
+
mat4 influence;
|
|
255
|
+
#ifdef BONETEXTURE
|
|
256
|
+
influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];
|
|
257
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
258
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];
|
|
259
|
+
#endif
|
|
260
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
261
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];
|
|
262
|
+
#endif
|
|
263
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
264
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];
|
|
265
|
+
#endif
|
|
266
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
267
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];
|
|
268
|
+
#endif
|
|
269
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
270
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];
|
|
271
|
+
#endif
|
|
272
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
273
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];
|
|
274
|
+
#endif
|
|
275
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
276
|
+
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];
|
|
277
|
+
#endif
|
|
278
|
+
#else
|
|
279
|
+
influence=mBones[int(matricesIndices[0])]*matricesWeights[0];
|
|
280
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
281
|
+
influence+=mBones[int(matricesIndices[1])]*matricesWeights[1];
|
|
282
|
+
#endif
|
|
283
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
284
|
+
influence+=mBones[int(matricesIndices[2])]*matricesWeights[2];
|
|
285
|
+
#endif
|
|
286
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
287
|
+
influence+=mBones[int(matricesIndices[3])]*matricesWeights[3];
|
|
288
|
+
#endif
|
|
289
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
290
|
+
influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
|
|
291
|
+
#endif
|
|
292
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
293
|
+
influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
|
|
294
|
+
#endif
|
|
295
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
296
|
+
influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
|
|
297
|
+
#endif
|
|
298
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
299
|
+
influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
|
|
300
|
+
#endif
|
|
301
|
+
#endif
|
|
302
|
+
finalWorld=finalWorld*influence;
|
|
303
|
+
#endif
|
|
304
|
+
#endif
|
|
305
|
+
`;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["bonesVertex",0,{name:a,shader:n}],30667);let o="bakedVertexAnimation",d=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
306
|
+
{
|
|
307
|
+
#ifdef INSTANCES
|
|
308
|
+
#define BVASNAME bakedVertexAnimationSettingsInstanced
|
|
309
|
+
#else
|
|
310
|
+
#define BVASNAME bakedVertexAnimationSettings
|
|
311
|
+
#endif
|
|
312
|
+
float VATStartFrame=BVASNAME.x;float VATEndFrame=BVASNAME.y;float VATOffsetFrame=BVASNAME.z;float VATSpeed=BVASNAME.w;float totalFrames=VATEndFrame-VATStartFrame+1.0;float time=bakedVertexAnimationTime*VATSpeed/totalFrames;float frameCorrection=time<1.0 ? 0.0 : 1.0;float numOfFrames=totalFrames-frameCorrection;float VATFrameNum=fract(time)*numOfFrames;VATFrameNum=mod(VATFrameNum+VATOffsetFrame,numOfFrames);VATFrameNum=floor(VATFrameNum);VATFrameNum+=VATStartFrame+frameCorrection;mat4 VATInfluence;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[0],VATFrameNum)*matricesWeights[0];
|
|
313
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
314
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[1],VATFrameNum)*matricesWeights[1];
|
|
315
|
+
#endif
|
|
316
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
317
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[2],VATFrameNum)*matricesWeights[2];
|
|
318
|
+
#endif
|
|
319
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
320
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[3],VATFrameNum)*matricesWeights[3];
|
|
321
|
+
#endif
|
|
322
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
323
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[0],VATFrameNum)*matricesWeightsExtra[0];
|
|
324
|
+
#endif
|
|
325
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
326
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[1],VATFrameNum)*matricesWeightsExtra[1];
|
|
327
|
+
#endif
|
|
328
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
329
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[2],VATFrameNum)*matricesWeightsExtra[2];
|
|
330
|
+
#endif
|
|
331
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
332
|
+
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[3],VATFrameNum)*matricesWeightsExtra[3];
|
|
333
|
+
#endif
|
|
334
|
+
finalWorld=finalWorld*VATInfluence;}
|
|
335
|
+
#endif
|
|
336
|
+
`;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["bakedVertexAnimation",0,{name:o,shader:d}],76955);let f="clipPlaneVertex",c=`#ifdef CLIPPLANE
|
|
337
|
+
fClipDistance=dot(worldPos,vClipPlane);
|
|
338
|
+
#endif
|
|
339
|
+
#ifdef CLIPPLANE2
|
|
340
|
+
fClipDistance2=dot(worldPos,vClipPlane2);
|
|
341
|
+
#endif
|
|
342
|
+
#ifdef CLIPPLANE3
|
|
343
|
+
fClipDistance3=dot(worldPos,vClipPlane3);
|
|
344
|
+
#endif
|
|
345
|
+
#ifdef CLIPPLANE4
|
|
346
|
+
fClipDistance4=dot(worldPos,vClipPlane4);
|
|
347
|
+
#endif
|
|
348
|
+
#ifdef CLIPPLANE5
|
|
349
|
+
fClipDistance5=dot(worldPos,vClipPlane5);
|
|
350
|
+
#endif
|
|
351
|
+
#ifdef CLIPPLANE6
|
|
352
|
+
fClipDistance6=dot(worldPos,vClipPlane6);
|
|
353
|
+
#endif
|
|
354
|
+
`;i.ShaderStore.IncludesShadersStore[f]||(i.ShaderStore.IncludesShadersStore[f]=c),e.s(["clipPlaneVertex",0,{name:f,shader:c}],16607);let l="fogVertex",s=`#ifdef FOG
|
|
355
|
+
vFogDistance=(view*worldPos).xyz;
|
|
356
|
+
#endif
|
|
357
|
+
`;i.ShaderStore.IncludesShadersStore[l]||(i.ShaderStore.IncludesShadersStore[l]=s),e.s(["fogVertex",0,{name:l,shader:s}],29231);let m="vertexColorMixing",S=`#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
|
|
358
|
+
vColor=vec4(1.0);
|
|
359
|
+
#ifdef VERTEXCOLOR
|
|
360
|
+
#ifdef VERTEXALPHA
|
|
361
|
+
vColor*=colorUpdated;
|
|
362
|
+
#else
|
|
363
|
+
vColor.rgb*=colorUpdated.rgb;
|
|
364
|
+
#endif
|
|
365
|
+
#endif
|
|
366
|
+
#ifdef INSTANCESCOLOR
|
|
367
|
+
vColor*=instanceColor;
|
|
368
|
+
#endif
|
|
369
|
+
#endif
|
|
370
|
+
`;i.ShaderStore.IncludesShadersStore[m]||(i.ShaderStore.IncludesShadersStore[m]=S),e.s(["vertexColorMixing",0,{name:m,shader:S}],17464)},44237,e=>{"use strict";var i=e.i(12423);let r="decalVertexDeclaration",t=`#ifdef DECAL
|
|
371
|
+
uniform vec4 vDecalInfos;uniform mat4 decalMatrix;
|
|
372
|
+
#endif
|
|
373
|
+
`;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t);let a="defaultVertexDeclaration",n=`uniform mat4 viewProjection;
|
|
374
|
+
#ifdef MULTIVIEW
|
|
375
|
+
mat4 viewProjectionR;
|
|
376
|
+
#endif
|
|
377
|
+
uniform mat4 view;
|
|
378
|
+
#ifdef DIFFUSE
|
|
379
|
+
uniform mat4 diffuseMatrix;uniform vec2 vDiffuseInfos;
|
|
380
|
+
#endif
|
|
381
|
+
#ifdef AMBIENT
|
|
382
|
+
uniform mat4 ambientMatrix;uniform vec2 vAmbientInfos;
|
|
383
|
+
#endif
|
|
384
|
+
#ifdef OPACITY
|
|
385
|
+
uniform mat4 opacityMatrix;uniform vec2 vOpacityInfos;
|
|
386
|
+
#endif
|
|
387
|
+
#ifdef EMISSIVE
|
|
388
|
+
uniform vec2 vEmissiveInfos;uniform mat4 emissiveMatrix;
|
|
389
|
+
#endif
|
|
390
|
+
#ifdef LIGHTMAP
|
|
391
|
+
uniform vec2 vLightmapInfos;uniform mat4 lightmapMatrix;
|
|
392
|
+
#endif
|
|
393
|
+
#if defined(SPECULAR) && defined(SPECULARTERM)
|
|
394
|
+
uniform vec2 vSpecularInfos;uniform mat4 specularMatrix;
|
|
395
|
+
#endif
|
|
396
|
+
#ifdef BUMP
|
|
397
|
+
uniform vec3 vBumpInfos;uniform mat4 bumpMatrix;
|
|
398
|
+
#endif
|
|
399
|
+
#ifdef REFLECTION
|
|
400
|
+
uniform mat4 reflectionMatrix;
|
|
401
|
+
#endif
|
|
402
|
+
#ifdef POINTSIZE
|
|
403
|
+
uniform float pointSize;
|
|
404
|
+
#endif
|
|
405
|
+
#ifdef DETAIL
|
|
406
|
+
uniform vec4 vDetailInfos;uniform mat4 detailMatrix;
|
|
407
|
+
#endif
|
|
408
|
+
uniform vec4 cameraInfo;uniform vec4 vTextureRepetitionHexTilingParams;
|
|
409
|
+
#include<decalVertexDeclaration>
|
|
410
|
+
#define ADDITIONAL_VERTEX_DECLARATION
|
|
411
|
+
`;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n);var o=e.i(85668),d=e.i(6232),f=e.i(44661);let c="uvAttributeDeclaration",l=`#ifdef UV{X}
|
|
412
|
+
attribute vec2 uv{X};
|
|
413
|
+
#endif
|
|
414
|
+
`;i.ShaderStore.IncludesShadersStore[c]||(i.ShaderStore.IncludesShadersStore[c]=l);var s=e.i(65296),m=e.i(39067),S=e.i(15420),E=e.i(85863);let v="prePassVertexDeclaration",u=`#ifdef PREPASS
|
|
415
|
+
#ifdef PREPASS_LOCAL_POSITION
|
|
416
|
+
varying vec3 vPosition;
|
|
417
|
+
#endif
|
|
418
|
+
#ifdef PREPASS_DEPTH
|
|
419
|
+
varying vec3 vViewPos;
|
|
420
|
+
#endif
|
|
421
|
+
#ifdef PREPASS_NORMALIZED_VIEW_DEPTH
|
|
422
|
+
varying float vNormViewDepth;
|
|
423
|
+
#endif
|
|
424
|
+
#if defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)
|
|
425
|
+
uniform mat4 previousViewProjection;varying vec4 vCurrentPosition;varying vec4 vPreviousPosition;
|
|
426
|
+
#endif
|
|
427
|
+
#endif
|
|
428
|
+
`;i.ShaderStore.IncludesShadersStore[v]||(i.ShaderStore.IncludesShadersStore[v]=u);var I=e.i(92692);let A="samplerVertexDeclaration",N=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
|
|
429
|
+
varying vec2 v_VARYINGNAME_UV;
|
|
430
|
+
#endif
|
|
431
|
+
`;i.ShaderStore.IncludesShadersStore[A]||(i.ShaderStore.IncludesShadersStore[A]=N);let T="bumpVertexDeclaration",x=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
|
|
432
|
+
#if defined(TANGENT) && defined(NORMAL)
|
|
433
|
+
varying mat3 vTBN;
|
|
434
|
+
#endif
|
|
435
|
+
#endif
|
|
436
|
+
`;i.ShaderStore.IncludesShadersStore[T]||(i.ShaderStore.IncludesShadersStore[T]=x);var _=e.i(42927),h=e.i(57828);let p="lightVxFragmentDeclaration",R=`#ifdef LIGHT{X}
|
|
437
|
+
uniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};
|
|
438
|
+
#ifdef SPECULARTERM
|
|
439
|
+
uniform vec4 vLightSpecular{X};
|
|
440
|
+
#else
|
|
441
|
+
vec4 vLightSpecular{X}=vec4(0.);
|
|
442
|
+
#endif
|
|
443
|
+
#ifdef SHADOW{X}
|
|
444
|
+
#ifdef SHADOWCSM{X}
|
|
445
|
+
uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};
|
|
446
|
+
#elif defined(SHADOWCUBE{X})
|
|
447
|
+
#else
|
|
448
|
+
varying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};
|
|
449
|
+
#endif
|
|
450
|
+
uniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};
|
|
451
|
+
#endif
|
|
452
|
+
#ifdef SPOTLIGHT{X}
|
|
453
|
+
uniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};
|
|
454
|
+
#elif defined(POINTLIGHT{X})
|
|
455
|
+
uniform vec4 vLightFalloff{X};
|
|
456
|
+
#elif defined(HEMILIGHT{X})
|
|
457
|
+
uniform vec3 vLightGround{X};
|
|
458
|
+
#endif
|
|
459
|
+
#if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
|
|
460
|
+
uniform vec4 vLightWidth{X};uniform vec4 vLightHeight{X};
|
|
461
|
+
#endif
|
|
462
|
+
#endif
|
|
463
|
+
`;i.ShaderStore.IncludesShadersStore[p]||(i.ShaderStore.IncludesShadersStore[p]=R);let M="lightVxUboDeclaration",V=`#ifdef LIGHT{X}
|
|
464
|
+
uniform Light{X}
|
|
465
|
+
{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;
|
|
466
|
+
#ifdef SPOTLIGHT{X}
|
|
467
|
+
vec4 vLightDirection;vec4 vLightFalloff;
|
|
468
|
+
#elif defined(POINTLIGHT{X})
|
|
469
|
+
vec4 vLightFalloff;
|
|
470
|
+
#elif defined(HEMILIGHT{X})
|
|
471
|
+
vec3 vLightGround;
|
|
472
|
+
#elif defined(CLUSTLIGHT{X})
|
|
473
|
+
vec2 vSliceData;vec2 vSliceRanges[CLUSTLIGHT_SLICES];
|
|
474
|
+
#endif
|
|
475
|
+
#if defined(AREALIGHT{X}) && defined(AREALIGHTUSED) && defined(AREALIGHTSUPPORTED)
|
|
476
|
+
vec4 vLightWidth;vec4 vLightHeight;
|
|
477
|
+
#endif
|
|
478
|
+
vec4 shadowsInfo;vec2 depthValues;} light{X};
|
|
479
|
+
#ifdef SHADOW{X}
|
|
480
|
+
#ifdef SHADOWCSM{X}
|
|
481
|
+
uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};
|
|
482
|
+
#elif defined(SHADOWCUBE{X})
|
|
483
|
+
#else
|
|
484
|
+
varying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};
|
|
485
|
+
#endif
|
|
486
|
+
#endif
|
|
487
|
+
#endif
|
|
488
|
+
`;i.ShaderStore.IncludesShadersStore[M]||(i.ShaderStore.IncludesShadersStore[M]=V);let P="morphTargetsVertexGlobalDeclaration",g=`#ifdef MORPHTARGETS
|
|
489
|
+
uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];
|
|
490
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
491
|
+
uniform float morphTargetTextureIndices[NUM_MORPH_INFLUENCERS];uniform vec3 morphTargetTextureInfo;uniform highp sampler2DArray morphTargets;vec3 readVector3FromRawSampler(int targetIndex,float vertexIndex)
|
|
492
|
+
{
|
|
493
|
+
#if defined(WEBGL2) || defined(WEBGPU)
|
|
494
|
+
int textureWidth=int(morphTargetTextureInfo.y);int y=int(vertexIndex)/textureWidth;int x=int(vertexIndex) % textureWidth;return texelFetch(morphTargets,ivec3(x,y,int(morphTargetTextureIndices[targetIndex])),0).xyz;
|
|
495
|
+
#else
|
|
496
|
+
float y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphTargetTextureInfo.y;vec3 textureUV=vec3((x+0.5)/morphTargetTextureInfo.y,(y+0.5)/morphTargetTextureInfo.z,morphTargetTextureIndices[targetIndex]);return texture(morphTargets,textureUV).xyz;
|
|
497
|
+
#endif
|
|
498
|
+
}
|
|
499
|
+
vec4 readVector4FromRawSampler(int targetIndex,float vertexIndex)
|
|
500
|
+
{
|
|
501
|
+
#if defined(WEBGL2) || defined(WEBGPU)
|
|
502
|
+
int textureWidth=int(morphTargetTextureInfo.y);int y=int(vertexIndex)/textureWidth;int x=int(vertexIndex) % textureWidth;return texelFetch(morphTargets,ivec3(x,y,int(morphTargetTextureIndices[targetIndex])),0);
|
|
503
|
+
#else
|
|
504
|
+
float y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphTargetTextureInfo.y;vec3 textureUV=vec3((x+0.5)/morphTargetTextureInfo.y,(y+0.5)/morphTargetTextureInfo.z,morphTargetTextureIndices[targetIndex]);return texture(morphTargets,textureUV);
|
|
505
|
+
#endif
|
|
506
|
+
}
|
|
507
|
+
#endif
|
|
508
|
+
#endif
|
|
509
|
+
`;i.ShaderStore.IncludesShadersStore[P]||(i.ShaderStore.IncludesShadersStore[P]=g);let O="morphTargetsVertexDeclaration",U=`#ifdef MORPHTARGETS
|
|
510
|
+
#ifndef MORPHTARGETS_TEXTURE
|
|
511
|
+
#ifdef MORPHTARGETS_POSITION
|
|
512
|
+
attribute vec3 position{X};
|
|
513
|
+
#endif
|
|
514
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
515
|
+
attribute vec3 normal{X};
|
|
516
|
+
#endif
|
|
517
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
518
|
+
attribute vec3 tangent{X};
|
|
519
|
+
#endif
|
|
520
|
+
#ifdef MORPHTARGETS_UV
|
|
521
|
+
attribute vec2 uv_{X};
|
|
522
|
+
#endif
|
|
523
|
+
#ifdef MORPHTARGETS_UV2
|
|
524
|
+
attribute vec2 uv2_{X};
|
|
525
|
+
#endif
|
|
526
|
+
#ifdef MORPHTARGETS_COLOR
|
|
527
|
+
attribute vec4 color{X};
|
|
528
|
+
#endif
|
|
529
|
+
#elif {X}==0
|
|
530
|
+
uniform float morphTargetCount;
|
|
531
|
+
#endif
|
|
532
|
+
#endif
|
|
533
|
+
`;i.ShaderStore.IncludesShadersStore[O]||(i.ShaderStore.IncludesShadersStore[O]=U);var L=e.i(97226);let C="morphTargetsVertexGlobal",D=`#ifdef MORPHTARGETS
|
|
534
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
535
|
+
float vertexID;
|
|
536
|
+
#endif
|
|
537
|
+
#endif
|
|
538
|
+
`;i.ShaderStore.IncludesShadersStore[C]||(i.ShaderStore.IncludesShadersStore[C]=D);let F="morphTargetsVertex",b=`#ifdef MORPHTARGETS
|
|
539
|
+
#ifdef MORPHTARGETS_TEXTURE
|
|
540
|
+
#if {X}==0
|
|
541
|
+
for (int i=0; i<NUM_MORPH_INFLUENCERS; i++) {if (float(i)>=morphTargetCount) break;vertexID=float(gl_VertexID)*morphTargetTextureInfo.x;
|
|
542
|
+
#ifdef MORPHTARGETS_POSITION
|
|
543
|
+
positionUpdated+=(readVector3FromRawSampler(i,vertexID)-position)*morphTargetInfluences[i];
|
|
544
|
+
#endif
|
|
545
|
+
#ifdef MORPHTARGETTEXTURE_HASPOSITIONS
|
|
546
|
+
vertexID+=1.0;
|
|
547
|
+
#endif
|
|
548
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
549
|
+
normalUpdated+=(readVector3FromRawSampler(i,vertexID) -normal)*morphTargetInfluences[i];
|
|
550
|
+
#endif
|
|
551
|
+
#ifdef MORPHTARGETTEXTURE_HASNORMALS
|
|
552
|
+
vertexID+=1.0;
|
|
553
|
+
#endif
|
|
554
|
+
#ifdef MORPHTARGETS_UV
|
|
555
|
+
uvUpdated+=(readVector3FromRawSampler(i,vertexID).xy-uv)*morphTargetInfluences[i];
|
|
556
|
+
#endif
|
|
557
|
+
#ifdef MORPHTARGETTEXTURE_HASUVS
|
|
558
|
+
vertexID+=1.0;
|
|
559
|
+
#endif
|
|
560
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
561
|
+
tangentUpdated.xyz+=(readVector3FromRawSampler(i,vertexID) -tangent.xyz)*morphTargetInfluences[i];
|
|
562
|
+
#endif
|
|
563
|
+
#ifdef MORPHTARGETTEXTURE_HASTANGENTS
|
|
564
|
+
vertexID+=1.0;
|
|
565
|
+
#endif
|
|
566
|
+
#ifdef MORPHTARGETS_UV2
|
|
567
|
+
uv2Updated+=(readVector3FromRawSampler(i,vertexID).xy-uv2)*morphTargetInfluences[i];
|
|
568
|
+
#endif
|
|
569
|
+
#ifdef MORPHTARGETTEXTURE_HASUV2S
|
|
570
|
+
vertexID+=1.0;
|
|
571
|
+
#endif
|
|
572
|
+
#ifdef MORPHTARGETS_COLOR
|
|
573
|
+
colorUpdated+=(readVector4FromRawSampler(i,vertexID)-color)*morphTargetInfluences[i];
|
|
574
|
+
#endif
|
|
575
|
+
}
|
|
576
|
+
#endif
|
|
577
|
+
#else
|
|
578
|
+
#ifdef MORPHTARGETS_POSITION
|
|
579
|
+
positionUpdated+=(position{X}-position)*morphTargetInfluences[{X}];
|
|
580
|
+
#endif
|
|
581
|
+
#ifdef MORPHTARGETS_NORMAL
|
|
582
|
+
normalUpdated+=(normal{X}-normal)*morphTargetInfluences[{X}];
|
|
583
|
+
#endif
|
|
584
|
+
#ifdef MORPHTARGETS_TANGENT
|
|
585
|
+
tangentUpdated.xyz+=(tangent{X}-tangent.xyz)*morphTargetInfluences[{X}];
|
|
586
|
+
#endif
|
|
587
|
+
#ifdef MORPHTARGETS_UV
|
|
588
|
+
uvUpdated+=(uv_{X}-uv)*morphTargetInfluences[{X}];
|
|
589
|
+
#endif
|
|
590
|
+
#ifdef MORPHTARGETS_UV2
|
|
591
|
+
uv2Updated+=(uv2_{X}-uv2)*morphTargetInfluences[{X}];
|
|
592
|
+
#endif
|
|
593
|
+
#ifdef MORPHTARGETS_COLOR
|
|
594
|
+
colorUpdated+=(color{X}-color)*morphTargetInfluences[{X}];
|
|
595
|
+
#endif
|
|
596
|
+
#endif
|
|
597
|
+
#endif
|
|
598
|
+
`;i.ShaderStore.IncludesShadersStore[F]||(i.ShaderStore.IncludesShadersStore[F]=b);var X=e.i(40805),W=e.i(30667),G=e.i(76955);let B="prePassVertex",w=`#ifdef PREPASS_DEPTH
|
|
599
|
+
vViewPos=(view*worldPos).rgb;
|
|
600
|
+
#endif
|
|
601
|
+
#ifdef PREPASS_NORMALIZED_VIEW_DEPTH
|
|
602
|
+
vNormViewDepth=((view*worldPos).z-cameraInfo.x)/(cameraInfo.y-cameraInfo.x);
|
|
603
|
+
#endif
|
|
604
|
+
#ifdef PREPASS_LOCAL_POSITION
|
|
605
|
+
vPosition=positionUpdated.xyz;
|
|
606
|
+
#endif
|
|
607
|
+
#if (defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && defined(BONES_VELOCITY_ENABLED)
|
|
608
|
+
vCurrentPosition=viewProjection*worldPos;
|
|
609
|
+
#if NUM_BONE_INFLUENCERS>0
|
|
610
|
+
mat4 previousInfluence;previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0];
|
|
611
|
+
#if NUM_BONE_INFLUENCERS>1
|
|
612
|
+
previousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1];
|
|
613
|
+
#endif
|
|
614
|
+
#if NUM_BONE_INFLUENCERS>2
|
|
615
|
+
previousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2];
|
|
616
|
+
#endif
|
|
617
|
+
#if NUM_BONE_INFLUENCERS>3
|
|
618
|
+
previousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3];
|
|
619
|
+
#endif
|
|
620
|
+
#if NUM_BONE_INFLUENCERS>4
|
|
621
|
+
previousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
|
|
622
|
+
#endif
|
|
623
|
+
#if NUM_BONE_INFLUENCERS>5
|
|
624
|
+
previousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
|
|
625
|
+
#endif
|
|
626
|
+
#if NUM_BONE_INFLUENCERS>6
|
|
627
|
+
previousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
|
|
628
|
+
#endif
|
|
629
|
+
#if NUM_BONE_INFLUENCERS>7
|
|
630
|
+
previousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
|
|
631
|
+
#endif
|
|
632
|
+
vPreviousPosition=previousViewProjection*finalPreviousWorld*previousInfluence*vec4(positionUpdated,1.0);
|
|
633
|
+
#else
|
|
634
|
+
vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);
|
|
635
|
+
#endif
|
|
636
|
+
#endif
|
|
637
|
+
`;i.ShaderStore.IncludesShadersStore[B]||(i.ShaderStore.IncludesShadersStore[B]=w);let y="uvVariableDeclaration",H=`#if !defined(UV{X}) && defined(MAINUV{X})
|
|
638
|
+
vec2 uv{X}=vec2(0.,0.);
|
|
639
|
+
#endif
|
|
640
|
+
#ifdef MAINUV{X}
|
|
641
|
+
vMainUV{X}=uv{X};
|
|
642
|
+
#endif
|
|
643
|
+
`;i.ShaderStore.IncludesShadersStore[y]||(i.ShaderStore.IncludesShadersStore[y]=H);let Y="samplerVertexImplementation",z=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
|
|
644
|
+
if (v_INFONAME_==0.)
|
|
645
|
+
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uvUpdated,1.0,0.0));}
|
|
646
|
+
#ifdef UV2
|
|
647
|
+
else if (v_INFONAME_==1.)
|
|
648
|
+
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv2Updated,1.0,0.0));}
|
|
649
|
+
#endif
|
|
650
|
+
#ifdef UV3
|
|
651
|
+
else if (v_INFONAME_==2.)
|
|
652
|
+
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv3,1.0,0.0));}
|
|
653
|
+
#endif
|
|
654
|
+
#ifdef UV4
|
|
655
|
+
else if (v_INFONAME_==3.)
|
|
656
|
+
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv4,1.0,0.0));}
|
|
657
|
+
#endif
|
|
658
|
+
#ifdef UV5
|
|
659
|
+
else if (v_INFONAME_==4.)
|
|
660
|
+
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv5,1.0,0.0));}
|
|
661
|
+
#endif
|
|
662
|
+
#ifdef UV6
|
|
663
|
+
else if (v_INFONAME_==5.)
|
|
664
|
+
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv6,1.0,0.0));}
|
|
665
|
+
#endif
|
|
666
|
+
#endif
|
|
667
|
+
`;i.ShaderStore.IncludesShadersStore[Y]||(i.ShaderStore.IncludesShadersStore[Y]=z);let k="bumpVertex",j=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
|
|
668
|
+
#if defined(TANGENT) && defined(NORMAL)
|
|
669
|
+
vec3 tbnNormal=normalize(normalUpdated);vec3 tbnTangent=normalize(tangentUpdated.xyz);vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);
|
|
670
|
+
#endif
|
|
671
|
+
#endif
|
|
672
|
+
`;i.ShaderStore.IncludesShadersStore[k]||(i.ShaderStore.IncludesShadersStore[k]=j);var Z=e.i(16607),q=e.i(29231);let K="shadowsVertex",Q=`#ifdef SHADOWS
|
|
673
|
+
#if defined(SHADOWCSM{X})
|
|
674
|
+
vPositionFromCamera{X}=view*worldPos;for (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) {vPositionFromLight{X}[i]=lightMatrix{X}[i]*worldPos;
|
|
675
|
+
#ifdef USE_REVERSE_DEPTHBUFFER
|
|
676
|
+
vDepthMetric{X}[i]=(-vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;
|
|
677
|
+
#else
|
|
678
|
+
vDepthMetric{X}[i]=(vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;
|
|
679
|
+
#endif
|
|
680
|
+
}
|
|
681
|
+
#elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})
|
|
682
|
+
vPositionFromLight{X}=lightMatrix{X}*worldPos;
|
|
683
|
+
#ifdef USE_REVERSE_DEPTHBUFFER
|
|
684
|
+
vDepthMetric{X}=(-vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
|
|
685
|
+
#else
|
|
686
|
+
vDepthMetric{X}=(vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
|
|
687
|
+
#endif
|
|
688
|
+
#endif
|
|
689
|
+
#endif
|
|
690
|
+
`;i.ShaderStore.IncludesShadersStore[K]||(i.ShaderStore.IncludesShadersStore[K]=Q);var J=e.i(17464);let $="pointCloudVertex",ee=`#if defined(POINTSIZE) && !defined(WEBGPU)
|
|
691
|
+
gl_PointSize=pointSize;
|
|
692
|
+
#endif
|
|
693
|
+
`;i.ShaderStore.IncludesShadersStore[$]||(i.ShaderStore.IncludesShadersStore[$]=ee);let ei="logDepthVertex",er=`#ifdef LOGARITHMICDEPTH
|
|
694
|
+
vFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;
|
|
695
|
+
#endif
|
|
696
|
+
`;i.ShaderStore.IncludesShadersStore[ei]||(i.ShaderStore.IncludesShadersStore[ei]=er);let et="defaultVertexShader",ea=`#define CUSTOM_VERTEX_EXTENSION
|
|
697
|
+
#include<__decl__defaultVertex>
|
|
698
|
+
#define CUSTOM_VERTEX_BEGIN
|
|
699
|
+
attribute vec3 position;
|
|
700
|
+
#ifdef NORMAL
|
|
701
|
+
attribute vec3 normal;
|
|
702
|
+
#endif
|
|
703
|
+
#ifdef TANGENT
|
|
704
|
+
attribute vec4 tangent;
|
|
705
|
+
#endif
|
|
706
|
+
#ifdef UV1
|
|
707
|
+
attribute vec2 uv;
|
|
708
|
+
#endif
|
|
709
|
+
#include<uvAttributeDeclaration>[2..7]
|
|
710
|
+
#ifdef VERTEXCOLOR
|
|
711
|
+
attribute vec4 color;
|
|
712
|
+
#endif
|
|
713
|
+
#include<helperFunctions>
|
|
714
|
+
#include<bonesDeclaration>
|
|
715
|
+
#include<bakedVertexAnimationDeclaration>
|
|
716
|
+
#include<instancesDeclaration>
|
|
717
|
+
#include<prePassVertexDeclaration>
|
|
718
|
+
#include<mainUVVaryingDeclaration>[1..7]
|
|
719
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse)
|
|
720
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)
|
|
721
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)
|
|
722
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)
|
|
723
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)
|
|
724
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)
|
|
725
|
+
#if defined(SPECULARTERM)
|
|
726
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular)
|
|
727
|
+
#endif
|
|
728
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)
|
|
729
|
+
#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)
|
|
730
|
+
varying vec3 vPositionW;
|
|
731
|
+
#ifdef NORMAL
|
|
732
|
+
varying vec3 vNormalW;
|
|
733
|
+
#endif
|
|
734
|
+
#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
|
|
735
|
+
varying vec4 vColor;
|
|
736
|
+
#endif
|
|
737
|
+
#include<bumpVertexDeclaration>
|
|
738
|
+
#include<clipPlaneVertexDeclaration>
|
|
739
|
+
#include<fogVertexDeclaration>
|
|
740
|
+
#include<__decl__lightVxFragment>[0..maxSimultaneousLights]
|
|
741
|
+
#include<morphTargetsVertexGlobalDeclaration>
|
|
742
|
+
#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]
|
|
743
|
+
#ifdef REFLECTIONMAP_SKYBOX
|
|
744
|
+
varying vec3 vPositionUVW;
|
|
745
|
+
#endif
|
|
746
|
+
#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
|
|
747
|
+
varying vec3 vDirectionW;
|
|
748
|
+
#endif
|
|
749
|
+
#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0
|
|
750
|
+
varying float vViewDepth;
|
|
751
|
+
#endif
|
|
752
|
+
#include<logDepthDeclaration>
|
|
753
|
+
#define CUSTOM_VERTEX_DEFINITIONS
|
|
754
|
+
void main(void) {
|
|
755
|
+
#define CUSTOM_VERTEX_MAIN_BEGIN
|
|
756
|
+
vec3 positionUpdated=position;
|
|
757
|
+
#ifdef NORMAL
|
|
758
|
+
vec3 normalUpdated=normal;
|
|
759
|
+
#endif
|
|
760
|
+
#ifdef TANGENT
|
|
761
|
+
vec4 tangentUpdated=tangent;
|
|
762
|
+
#endif
|
|
763
|
+
#ifdef UV1
|
|
764
|
+
vec2 uvUpdated=uv;
|
|
765
|
+
#endif
|
|
766
|
+
#ifdef UV2
|
|
767
|
+
vec2 uv2Updated=uv2;
|
|
768
|
+
#endif
|
|
769
|
+
#ifdef VERTEXCOLOR
|
|
770
|
+
vec4 colorUpdated=color;
|
|
771
|
+
#endif
|
|
772
|
+
#include<morphTargetsVertexGlobal>
|
|
773
|
+
#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]
|
|
774
|
+
#ifdef REFLECTIONMAP_SKYBOX
|
|
775
|
+
vPositionUVW=positionUpdated;
|
|
776
|
+
#endif
|
|
777
|
+
#define CUSTOM_VERTEX_UPDATE_POSITION
|
|
778
|
+
#define CUSTOM_VERTEX_UPDATE_NORMAL
|
|
779
|
+
#include<instancesVertex>
|
|
780
|
+
#if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)
|
|
781
|
+
vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);
|
|
782
|
+
#endif
|
|
783
|
+
#include<bonesVertex>
|
|
784
|
+
#include<bakedVertexAnimation>
|
|
785
|
+
vec4 worldPos=finalWorld*vec4(positionUpdated,1.0);
|
|
786
|
+
#ifdef NORMAL
|
|
787
|
+
mat3 normalWorld=mat3(finalWorld);
|
|
788
|
+
#if defined(INSTANCES) && defined(THIN_INSTANCES)
|
|
789
|
+
vNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vNormalW=normalize(normalWorld*vNormalW);
|
|
790
|
+
#else
|
|
791
|
+
#ifdef NONUNIFORMSCALING
|
|
792
|
+
normalWorld=transposeMat3(inverseMat3(normalWorld));
|
|
793
|
+
#endif
|
|
794
|
+
vNormalW=normalize(normalWorld*normalUpdated);
|
|
795
|
+
#endif
|
|
796
|
+
#endif
|
|
797
|
+
#define CUSTOM_VERTEX_UPDATE_WORLDPOS
|
|
798
|
+
#ifdef MULTIVIEW
|
|
799
|
+
if (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}
|
|
800
|
+
#else
|
|
801
|
+
gl_Position=viewProjection*worldPos;
|
|
802
|
+
#endif
|
|
803
|
+
vPositionW=vec3(worldPos);
|
|
804
|
+
#ifdef PREPASS
|
|
805
|
+
#include<prePassVertex>
|
|
806
|
+
#endif
|
|
807
|
+
#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
|
|
808
|
+
vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));
|
|
809
|
+
#endif
|
|
810
|
+
#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0
|
|
811
|
+
#ifdef RIGHT_HANDED
|
|
812
|
+
vViewDepth=-(view*worldPos).z;
|
|
813
|
+
#else
|
|
814
|
+
vViewDepth=(view*worldPos).z;
|
|
815
|
+
#endif
|
|
816
|
+
#endif
|
|
817
|
+
#ifndef UV1
|
|
818
|
+
vec2 uvUpdated=vec2(0.,0.);
|
|
819
|
+
#endif
|
|
820
|
+
#ifndef UV2
|
|
821
|
+
vec2 uv2Updated=vec2(0.,0.);
|
|
822
|
+
#endif
|
|
823
|
+
#ifdef MAINUV1
|
|
824
|
+
vMainUV1=uvUpdated;
|
|
825
|
+
#endif
|
|
826
|
+
#ifdef MAINUV2
|
|
827
|
+
vMainUV2=uv2Updated;
|
|
828
|
+
#endif
|
|
829
|
+
#include<uvVariableDeclaration>[3..7]
|
|
830
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,DIFFUSE,_VARYINGNAME_,Diffuse,_MATRIXNAME_,diffuse,_INFONAME_,DiffuseInfos.x)
|
|
831
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)
|
|
832
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)
|
|
833
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)
|
|
834
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)
|
|
835
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)
|
|
836
|
+
#if defined(SPECULARTERM)
|
|
837
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR,_VARYINGNAME_,Specular,_MATRIXNAME_,specular,_INFONAME_,SpecularInfos.x)
|
|
838
|
+
#endif
|
|
839
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)
|
|
840
|
+
#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)
|
|
841
|
+
#include<bumpVertex>
|
|
842
|
+
#include<clipPlaneVertex>
|
|
843
|
+
#include<fogVertex>
|
|
844
|
+
#include<shadowsVertex>[0..maxSimultaneousLights]
|
|
845
|
+
#include<vertexColorMixing>
|
|
846
|
+
#include<pointCloudVertex>
|
|
847
|
+
#include<logDepthVertex>
|
|
848
|
+
#define CUSTOM_VERTEX_MAIN_END
|
|
849
|
+
}
|
|
850
|
+
`;for(let e of(i.ShaderStore.ShadersStore[et]||(i.ShaderStore.ShadersStore[et]=ea),[{name:r,shader:t},{name:a,shader:n},o.sceneUboDeclaration,d.meshUboDeclaration,f.defaultUboDeclaration,{name:c,shader:l},s.helperFunctions,m.bonesDeclaration,S.bakedVertexAnimationDeclaration,E.instancesDeclaration,{name:v,shader:u},I.mainUVVaryingDeclaration,{name:A,shader:N},{name:T,shader:x},_.clipPlaneVertexDeclaration,h.fogVertexDeclaration,{name:p,shader:R},{name:M,shader:V},{name:P,shader:g},{name:O,shader:U},L.logDepthDeclaration,{name:C,shader:D},{name:F,shader:b},X.instancesVertex,W.bonesVertex,G.bakedVertexAnimation,{name:B,shader:w},{name:y,shader:H},{name:Y,shader:z},{name:k,shader:j},Z.clipPlaneVertex,q.fogVertex,{name:K,shader:Q},J.vertexColorMixing,{name:$,shader:ee},{name:ei,shader:er}]))i.ShaderStore.IncludesShadersStore[e.name]||(i.ShaderStore.IncludesShadersStore[e.name]=e.shader);e.s(["defaultVertexShader",0,{name:et,shader:ea}],44237)}]);
|