eee 5 tee 6 iee 1, 2, 4 Vee webgl2 Hee ldr Wee 255 jee 1, 2, 4 Xee 0 $ee 0 Jee 0 qee 15 ite 0 ate 0 ute 0 _te 0 bte 0 oie -1 mie linear vie 0 yie 0 Tie 4 Eie 9 tse.base 0 tse.count 6 sse 0 hse 0, 1, 3, 2, 3, 1 cse 0, 1, 3, 0, 3, 2 Cse muPIHORMLNDCz4DxVR/ ZvYfAUVEFR47KRIC4nwAAAAAP7WxlhD6Ci+2HCe7BF8jRAPZwdH2UPpI5PdLCJdkvG4UTaNDJ/ 0crAzne71GCrb4kbdMjjCEGzdX6fNxDMLJq5xkeoIVTdfiZkodEeArmZmp/ FQzFjD4x8iOW7Dg64n+3mWqyEwLxXT8zoJXfbw8QJKDCaarUYyTlMzNFHbgUe9IQV7g4YOgtSKpIFZJ0qERm7u4 cut — Ase 0, 0), 0, 0), -1, 0), 1, 0), 0, -1), 0, 1) Ose 0 one null, sne, nne, rne, ane dne 0 Rne uniform highp {sampler} {name}; {returnType} load{funcName}() { return texelFetch({name}, splat.uv, 0); } {returnType} load{funcName}WithIndex(uint index) { return texelFetch({name}, ivec2(index % splatTextureSize, index / splatTextureSize cut — Fne vec3 getCenter() { return loadDataCenter().xyz; } vec4 getColor() { return loadDataColor(); } vec3 getScale() { return vec3(loadDataCenter().w); } vec4 getRotation() { return vec4(0.0, 0.0, 0.0, 1.0); } Nne fn getCenter() -> vec3f { return loadDataCenter().xyz; } fn getColor() -> vec4f { return loadDataColor(); } fn getScale() -> vec3f { return vec3f(loadDataCenter().w); } fn getRotation() -> vec4f { return vec4f(0.0, 0.0, 0.0, 1.0); } Vne void writeSplat(vec3 center, vec4 rotation, vec3 scale, vec4 color) { vec3 rgb = clamp(color.rgb, 0.0, 4.0); uint rBits = uint(rgb.r * (2047.0 / 4.0) + 0.5); uint gBits = uint(rgb.g * (2047.0 / 4.0) + 0.5); uint bBits = uint(rgb.b * (1 cut — Hne uvec4 cachedTransformA; uvec2 cachedTransformB; vec4 cachedColor; vec3 getCenter() { cachedTransformA = loadDataTransformA(); cachedTransformB = loadDataTransformB().xy; return vec3(uintBitsToFloat(cachedTransformA. r), uintBitsToFloat(c cut — Wne void writeSplat(vec3 center, vec4 rotation, vec3 scale, vec4 color) { #ifdef GSPLAT_COLOR_UINT uint packed_rg = packHalf2x16(color.rg); uint packed_ba = packHalf2x16(color.ba); writeDataColor(uvec4( packed_rg & 0xFFFFu, packedcut — $ne fn writeSplat(center: vec3f, rotation: vec4f, scale: vec3f, color: vec4f) { writeDataColor(color); #ifndef GSPLAT_COLOR_ONLY writeDataTransformA(vec4u(bitcast<u32>(center. x), bitcast<u32>(center.y), bitcast<u32>(center.z), pack2x16floa cut — logRange 21.0 logMin -12.0 invLogRange 255.0 Zne.linear decodeLinear Zne.srgb decodeGamma Zne.rgbm decodeRGBM Zne.rgbe decodeRGBE Zne.rgbp decodeRGBP Zne.xy unpackNormalXY Qne.linear encodeLinear Qne.srgb encodeGamma Qne.rgbm encodeRGBM Qne.rgbe encodeRGBE Are 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 bre 0, 1, 3, 2, 3, 1 Gre.aoMapVertexColor boolean Gre.diffuseMapTint boolean Gre. diffuseMapVertexColor boolean Gre.emissiveMapTint boolean Gre. emissiveMapVertexColor boolean Gre.glossMapVertexColor boolean Gre. metalnessMapVertexColor boolean Gre. opacityMapVertexColor boolean Gre.specularAntialias boolean Gre.specularMapTint boolean Gre. specularMapVertexColor boolean Gre.ambientTint boolean Gre.emissiveTint boolean Gre.diffuseTint boolean Gre.sheenTint boolean Gre.conserveEnergy boolean Gre.useGamma boolean Gre.useGammaTonemap boolean Gre.sheenGlossTint boolean shaders this.definitionsCache=new Map, this._generators=new Map, this._device=e, this._isClearingCache=!1, this._precached=!1, this._defaultStdMatOption=new hS, i, t, null, qf, null), tQre #define GSPLAT_CENTER_NOPROJ #include "gsplatHelpersVS" #include "gsplatFormatVS" #include "gsplatStructsVS" #include "gsplatDeclarationsVS" #include "gsplatCenterVS" #include "gsplatEvalSHVS" #include "gsplatQuatToMat3VS" #include "gsplatcut — qre attribute vec2 vertex_position; precision highp usampler2D; uniform usampler2D uSubDrawData; uniform ivec2 uTextureSize; uniform int uSubDrawBase; flat varying ivec4 vSubDraw; void main(void) { int subDrawWidth = textureSize(uSubDrawData, … — eae attribute vertex_position: vec2f; var uSubDrawData: texture_2d<u32>; uniform uTextureSize: vec2i; uniform uSubDrawBase: i32; varying @interpolate(flat) vSubDraw: vec4i; @vertex fn vertexMain(input: VertexInput) -> VertexOutput { var outpucut — nae 0 aae 0 hae attribute vec2 vertex_position; void main(void) { gl_Position = vec4(vertex_position, 0.0, 1.0); } cae #include "gsplatEvalSHVS" vec4 packRgb(vec3 v) { uvec3 vb = uvec3(clamp(v, vec3(0.0), vec3(1.0)) * vec3(2047.0, 2047.0, 1023.0)); uint bits = (vb.x << 21) | (vb.y << 10) | vb.z; return vec4((uvec4(bits) >> uvec4(24, 16, 8, 0)) & uvecut — uae attribute vertex_position: vec2f; @vertex fn vertexMain(input: VertexInput) -> VertexOutput { var output: VertexOutput; output.position = vec4f(vertex_position, 0.0, 1.0); return output; } fae uniform mediump sampler2D sh0; uniform highp sampler2D sh_labels; uniform mediump sampler2D sh_result; uniform vec4 sh0_mins; uniform vec4 sh0_maxs; float SH_C0 = 0.28209479177387814; vec3 unpackRgb(vec4 v) { uvec4 uv = uvec4(v * 2… — Sae #include "gsplatPackingPS" uniform highp sampler2D means_l; uniform highp sampler2D means_u; uniform highp sampler2D quats; uniform highp sampler2D scales; uniform highp sampler2D sh0; uniform highp sampler2D sh_labels; uniform highp uint cut — Eae #include "gsplatPackingPS" uniform highp sampler2D sh_centroids; uniform vec4 shN_codebook[64]; void main(void) { ivec2 uv = ivec2(gl_FragCoord.xy); vec3 shNSample = texelFetch(sh_centroids, uv, 0).xyz; #ifdef REORDER_V1 pcFragColor0 = cut — Cae #include "gsplatPackingPS" var sh_centroids: texture_2d<f32>; uniform shN_codebook: array<vec4f, 64>; @fragment fn fragmentMain(input: FragmentInput) -> FragmentOutput { var output: FragmentOutput; var uv = vec2i(input.position.xy); varcut — _ae #include "gsplatPackingPS" uniform highp sampler2D means_l; uniform highp sampler2D means_u; uniform highp uint numSplats; uniform highp vec3 means_mins; uniform highp vec3 means_maxs; void main(void) { int w = int(textureSize(means_l, 0)… — Iae NONE Lae FILL_WINDOW Rae FIXED kae -1 Uae.pvr extCompressedTexturePVRTC Uae.dxt extCompressedTextureS3TC Uae.etc2 extCompressedTextureETC Uae.etc1 extCompressedTextureETC1 Jae uniform float alpha_ref; void alphaTest(float a) { if (a < alpha_ref) discard; } qae #ifdef LIT_AMBIENT_SOURCE == AMBIENTSH uniform vec3 ambientSH[9]; #endif #if LIT_AMBIENT_SOURCE == ENVALATLAS #include "envAtlasPS" #ifndef ENV_ATLAS #define ENV_ATLAS uniform sampler2D texture_envAtlas; #endif #endif void addAmbiencut — eoe #ifdef LIT_GGX_SPECULAR uniform float material_anisotropyIntensity; uniform vec2 material_anisotropyRotation; #endif void getAnisotropy() { dAnisotropy = 0.0; dAnisotropyRotation = vec2(1.0, 0.0); #ifdef LIT_GGX_SPECULAR dAnisotropy =cut — toe #if defined(STD_AO_TEXTURE) || defined(STD_AO_VERTEX) uniform float material_aoIntensity; #endif #ifdef STD_AODETAIL_TEXTURE #include "detailModesPS" #endif void getAO() { dAo = 1.0; #ifdef STD_AO_TEXTURE float aoBase = texture2DBias cut — ioe void occludeDiffuse(float ao) { dDiffuseLight *= ao; } soe #if LIT_OCCLUDE_SPECULAR != NONE #ifdef LIT_OCCLUDE_SPECULAR_FLOAT uniform float material_occludeSpecularIntensity; #endif #endif void occludeSpecular(float gloss, float ao, vec3 worldNormal, vec3 viewDir) { #if LIT_OCCLUDE_SPECULAR =cut — roe #ifdef LIT_LIGHTMAP_BAKING_ADD_AMBIENT dDiffuseLight = ((dDiffuseLight - 0.5) * max(ambientBakeOcclusionContrast + 1.0, 0.0)) + 0.5; dDiffuseLight += vec3(ambientBakeOcclusionBrightness); dDiffuseLight = saturate(dDiffuseLight); dDiffucut — aoe uniform vec3 view_position; uniform vec3 light_globalAmbient; float square(float x) { return x*x; } float saturate(float x) { return clamp(x, 0.0, 1.0); } vec3 saturate(vec3 x) { return clamp(x, vec3(0.0), vec3(1.0)); } ooe #define NINESLICED varying vec2 vMask; varying vec2 vTiledUv; uniform mediump vec4 innerOffset; uniform mediump vec2 outerScale; uniform mediump vec4 atlasRect; vec2 nineSlicedUv; loe #define NINESLICED #define NINESLICETILED varying vec2 vMask; varying vec2 vTiledUv; uniform mediump vec4 innerOffset; uniform mediump vec2 outerScale; uniform mediump vec4 atlasRect; vec2 nineSlicedUv; hoe float bayer2(vec2 p) { return mod(2.0 * p.y + p.x + 1.0, 4.0); } float bayer4(vec2 p) { vec2 p1 = mod(p, 2.0); vec2 p2 = floor(0.5 * mod(p, 4.0)); return 4.0 * bayer2(p1) + bayer2(p2); } float bayer8(vec2 p) { vec2 p1 = mod(p, 2.0); cut — coe varying vec2 vUv0; uniform sampler2D source; uniform vec2 pixelOffset; #ifdef GAUSS uniform float weight[{SAMPLES}]; #endif void main(void) { vec3 moments = vec3(0.0); vec2 uv = vUv0 - pixelOffset * (float({SAMPLES}) * 0.5); for (int i… — uoe uniform float material_clearCoat; void getClearCoat() { ccSpecularity = material_clearCoat; #ifdef STD_CLEARCOAT_TEXTURE ccSpecularity *= texture2DBias({STD_CLEARCOAT_TEXTURE_NAME}, {STD_CLEARCOAT_TEXTURE_UV}, textureBias).{STD_CLEARCOA cut — doe uniform float material_clearCoatGloss; void getClearCoatGlossiness() { ccGlossiness = material_clearCoatGloss; #ifdef STD_CLEARCOATGLOSS_TEXTURE ccGlossiness *= texture2DBias({STD_CLEARCOATGLOSS_TEXTURE_NAME}, {STD_CLEARCOATGLOSS_TEXTUR cut — foe #ifdef STD_CLEARCOATNORMAL_TEXTURE uniform float material_clearCoatBumpiness; #endif void getClearCoatNormal() { #ifdef STD_CLEARCOATNORMAL_TEXTURE vec3 normalMap = {STD_CLEARCOATNORMAL_TEXTURE_DECODE}(texture2DBias({STD_CLEARCOATNORMAL_T cut — voe vec3 _ getShadowCoordPerspZbuffer(mat4 shadowMatrix, vec4 shadowParams, vec3 wPos) { vec4 projPos = shadowMatrix * vec4(wPos, 1.0); projPos.xyz /= projPos.w; return projPos.xyz; } vec3 getShadowCoord PerspZbufferNormal Offset(mat4 shadowMacut — goe #include "lightBufferDefinesPS" #include "clusteredLightUtilsPS" #ifdef CLUSTER_COOKIES #include "clusteredLightCookiesPS" #endif #ifdef CLUSTER_SHADOWS #include "clusteredLightShadowsPS" #endif uniform highp usampler2D clusterWorldTextu cut — yoe vec3 combineColor(vec3 albedo, vec3 sheenSpecularity, float clearcoatSpecularity) { vec3 ret = vec3(0); #ifdef LIT_OLD_AMBIENT ret += (dDiffuseLight - light_globalAmbient) * albedo + material_ambient * light_globalAmbient; #else ret += cut — xoe varying vec2 uv0; uniform sampler2D blitTexture; void main(void) { gl_FragColor = texture2D(blitTexture, uv0); } Soe varying vec2 uv0; uniform samplerCube blitTexture; uniform mat4 invViewProj; void main(void) { vec4 projPos = vec4(uv0 * 2.0 - 1.0, 0.5, 1.0); vec4 worldPos = invViewProj * projPos; gl_FragColor = textureCube(blitTexture, worldPoscut — Toe attribute vec2 vertex_position; varying vec2 uv0; void main(void) { gl_Position = vec4(vertex_position, 0.5, 1.0); uv0 = vertex_position.xy * 0.5 + 0.5; #ifndef WEBGPU uv0.y = 1.0 - uv0.y; #endif } Eoe vec4 getCookie2D(sampler2D tex, mat4 transform, float intensity) { vec4 projPos = transform * vec4(vPositionW, 1.0); projPos.xy /= projPos.w; return mix(vec4(1.0), texture2D(tex, projPos.xy), intensity); } vec4 getCookie2DClip(sampler2D cut — Coe #if LIT_CUBEMAP_PROJECTION == BOX uniform vec3 envBoxMin; uniform vec3 envBoxMax; #endif vec3 cubeMapProject(vec3 nrdir) { #if LIT_CUBEMAP_PROJECTION == NONE return cubeMapRotate(nrdir); #endif #if LIT_CUBEMAP_PROJECTION == BOX nrcut — _oe #ifdef CUBEMAP_ROTATION uniform mat3 cubeMapRotationMatrix; #endif vec3 cubeMapRotate(vec3 refDir) { #ifdef CUBEMAP_ROTATION return refDir * cubeMapRotationMatrix; #else return refDir; #endif } woe #ifdef DEBUG_ALBEDO_PASS gl_FragColor = vec4(gammaCorrectOutput(dAlbedo), 1.0); #endif #ifdef DEBUG_UV0_PASS gl_FragColor = vec4(litArgs_albedo , 1.0); #endif #ifdef DEBUG_WORLD_NORMAL_PASS gl_FragColor = vec4(litArgs_worldNormal * 0.5 + 0… — Aoe #ifdef DEBUG_LIGHTING_PASS litArgs_albedo = vec3(0.5); #endif #ifdef DEBUG_UV0_PASS #ifdef VARYING_VUV0 litArgs_albedo = vec3(vUv0, 0); #else litArgs_albedo = vec3(0); #endif #endif boe #ifndef _DECODE_INCLUDED_ #define _DECODE_INCLUDED_ vec3 decodeLinear(vec4 raw) { return raw.rgb; } float decodeGamma(float raw) { return pow(raw, 2.2); } vec3 decodeGamma(vec3 raw) { return pow(raw, vec3(2.2)); } vec3 decodeGamma(vec4 cut — Poe #ifndef _DETAILMODES_INCLUDED_ #define _DETAILMODES_INCLUDED_ vec3 detailMode_mul(vec3 c1, vec3 c2) { return c1 * c2; } vec3 detailMode_add(vec3 c1, vec3 c2) { return c1 + c2; } vec3 detailMode_screen(vec3 c1, vec3 c2) { return 1.0 - (1 cut — Moe uniform vec3 material_diffuse; #ifdef STD_DIFFUSEDETAIL_TEXTURE #include "detailModesPS" #endif void getAlbedo() { dAlbedo = material_diffuse.rgb; #ifdef STD_DIFFUSE_TEXTURE vec3 albedoTexture = {STD_DIFFUSE_TEXTURE_DECODE}(texture2DB cut — Ioe uniform vec3 material_emissive; uniform float material_emissiveIntensity; void getEmission() { dEmission = material_emissive * material_emissiveIntensity; #ifdef STD_EMISSIVE_TEXTURE dEmission *= {STD_EMISSIVE_TEXTURE_DECODE}(texture2DB cut — Loe vec4 encodeLinear(vec3 source) { return vec4(source, 1.0); } vec4 encodeGamma(vec3 source) { return vec4(pow(source + 0.0000001, vec3(1.0 / 2.2)), 1.0); } vec4 encodeRGBM(vec3 source) { vec4 result; result.rgb = pow(source.rgb, vec3(0. cut — Roe gl_FragColor.rgb = combineColor(litArgs_albedo, litArgs_sheen_specularity, litArgs_clearcoat_specularity); gl_FragColor.rgb += litArgs_emission; gl_FragColor.rgb = addFog(gl_FragColor.rgb); gl_FragColor.rgb = toneMap(gl_FragColor.rgb); cut — Doe #ifndef _ENVATLAS_INCLUDED_ #define _ENVATLAS_INCLUDED_ const float atlasSize = 512.0; const float seamSize = 1.0 / atlasSize; vec2 mapUv(vec2 uv, vec4 rect) { return vec2(mix(rect.x + seamSize, rect.x + rect.z - seamSize, uv.x), mix( … — Ooe #ifdef LIT_SKYBOX_INTENSITY uniform float skyboxIntensity; #endif vec3 processEnvironment(vec3 color) { #ifdef LIT_SKYBOX_INTENSITY return color * skyboxIntensity; #else return color; #endif } Foe float getFalloffWindow(float lightRadius, vec3 lightDir) { float sqrDist = dot(lightDir, lightDir); float invRadius = 1.0 / lightRadius; return square(saturate(1.0 - square(sqrDist * square(invRadius)))); } float getFalloffInvSquared(fl cut — Noe float getFalloffLinear(float lightRadius, vec3 lightDir) { float d = length(lightDir); return max(((lightRadius - d) / lightRadius), 0.0); } Boe #ifndef FLOAT_AS_UINT #define FLOAT_AS_UINT vec4 float2uint(float value) { uint intBits = floatBitsToUint(value); return vec4( float((intBits >> 24u) & 0xFFu) / 255.0, float((intBits >> 16u) & 0xFFu) / 255.0, float((intBits >> 8u) cut — koe float dBlendModeFogFactor = 1.0; #if (FOG != NONE) uniform vec3 fog_color; #if (FOG == LINEAR) uniform float fog_start; uniform float fog_end; #else uniform float fog_density; #endif #endif #ifdef VERTEXSHADER float getFogFactor cut — Uoe vec3 getFresnel( float cosTheta, float gloss, vec3 specularity #if defined(LIT_IRIDESCENCE) , vec3 iridescenceFresnel, float iridescenceIntensity #endif ) { float fresnel = pow(1.0 - saturate(cosTheta), 5.0); float glossSq cut — zoe attribute vec2 vertex_position; varying vec2 vUv0; void main(void) { gl_Position = vec4(vertex_position, 0.5, 1.0); vUv0 = vertex_position.xy * 0.5 + 0.5; } Goe #include "decodePS" #if (GAMMA == SRGB) float gammaCorrectInput(float color) { return decodeGamma(color); } vec3 gammaCorrectInput(vec3 color) { return decodeGamma(color); } vec4 gammaCorrectInput(vec4 color) { return vec4(decod cut — Voe #ifdef STD_GLOSS_CONSTANT uniform float material_gloss; #endif void getGlossiness() { dGlossiness = 1.0; #ifdef STD_GLOSS_CONSTANT dGlossiness *= material_gloss; #endif #ifdef STD_GLOSS_TEXTURE dGlossiness *= texture2DBias({STD_GLOSS cut — Hoe attribute vec2 aPosition; varying vec2 uv0; void main(void) { gl_Position = vec4(aPosition, 0.0, 1.0); uv0 = getImageEffectUV((aPosition.xy + 1.0) * 0.5); } Woe #include "gammaPS" varying vec4 color; void main(void) { gl_FragColor = vec4(gammaCorrect Output(decode Gamma(color.rgb)), color.a); } joe attribute vec4 vertex_position; attribute vec4 vertex_color; uniform mat4 matrix_model; uniform mat4 matrix_viewProjection; varying vec4 color; void main(void) { color = vertex_color; gl_Position = matrix_viewProjection * matrix_m cut — Yoe #ifdef STD_IRIDESCENCE_CONSTANT uniform float material_iridescence; #endif void getIridescence() { float iridescence = 1.0; #ifdef STD_IRIDESCENCE_CONSTANT iridescence *= material_iridescence; #endif #ifdef STD_IRIDESCENCE_TEXTURE ircut — $oe uniform float material_iridescenceThicknessMax; #ifdef STD_IRIDESCENCETHICKNESS_TEXTURE uniform float material_iridescenceThicknessMin; #endif void getIridescenceThickness() { #ifdef STD_IRIDESCENCETHICKNESS_TEXTURE float blend = texturcut — Koe #ifdef STD_IOR_CONSTANT uniform float material_refractionIndex; #endif void getIor() { #ifdef STD_IOR_CONSTANT dIor = material_refractionIndex; #else dIor = 1.0 / 1.5; #endif } Zoe #if defined(LIGHT{i}) uniform vec3 light{i}_color; #if LIGHT{i}TYPE == DIRECTIONAL uniform vec3 light{i}_direction; #else #define LIT_CODE_LIGHTS_POINT uniform vec3 light{i}_position; uniform float light{i}_radius; #if LIGHT{i … — Qoe float getLightDiffuse(vec3 worldNormal, vec3 viewDir, vec3 lightDirNorm) { return max(dot(worldNormal, -lightDirNorm), 0.0); } Joe vec3 evalOmniLight(vec3 lightPosW) { return vPositionW - lightPosW; } qoe #if defined(LIGHT{i}) evaluateLight{i}( #if defined(LIT_IRIDESCENCE) iridescenceFresnel #endif ); #endif ele #if defined(LIGHT{i}) void evaluateLight{i}( #if defined(LIT_IRIDESCENCE) vec3 iridescenceFresnel #endif ) { vec3 lightColor = light{i}_color; #if LIGHT{i}TYPE == DIRECTIONAL && !defined(LIT_SHADOW_CATCHER) if (all(equal(lightColor cut — tle #ifdef LIGHT{i}CASTSHADOW #ifdef LIGHT{i}_SHADOW_SAMPLE_POINT vec3 getShadowSampleCoordOmni {i}(vec4 shadowParams, vec3 worldPosition, vec3 lightPos, inout vec3 lightDir, vec3 lightDirNorm, vec3 normal) { #ifdef LIGHT{i}_SHADOW_SAMPLE cut — ile #ifdef LIT_CLUSTERED_LIGHTS #define LIT_CODE_FALLOFF_LINEAR #define LIT_CODE_FALLOFF_SQUARED #define LIT_CODE_LIGHTS_POINT #define LIT_CODE_LIGHTS_SPOT #endif #ifdef AREA_LIGHTS uniform highp sampler2D areaLightsLutTex1; uniform highcut —