Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge origin/main

Nguyen Xuan An16d46a1225f0
diff --cc src/shaders.js
index 96698b30,3a8f5c2a..d0b8d49b
--- a/src/shaders.js
+++ b/src/shaders.js
@@@ -540,8 -548,8 +545,8 @@@ void main()
color *= sampledBase.rgb;
textureAlpha = sampledBase.a;
}
- float alpha = surfaceAlpha(textureAlpha);
+ ${featureCode("surfaceHook")} float alpha = surfaceAlpha(textureAlpha);
- vec3 emission = emissionColor * surface.z;
+ vec3 emission = instanceEmission.rgb * surface.z;
if (USES_EMISSIVE_MAP) emission *= (BOX_MAPPED ? sampleBox(emissiveMap) : texture(emissiveMap, mapUV(hasEmissiveMap))).rgb;
if (USES_RENDER_PASS) {
outputColor = vec4(renderPassValue(color, normal, emission), 1.0);