diff --git a/examples/assets/scripts/misc/gooch-material.mjs b/examples/assets/scripts/misc/gooch-material.mjs index 9211123b6ea..d3bcf2a63dc 100644 --- a/examples/assets/scripts/misc/gooch-material.mjs +++ b/examples/assets/scripts/misc/gooch-material.mjs @@ -19,12 +19,12 @@ const createGoochMaterial = (texture, color) => { // declares vertex_position attribute, and handles skinning and morphing if necessary. // It also adds uniforms: matrix_viewProjection, matrix_model, matrix_normal. // Functions added: getModelMatrix, getLocalPosition - #include "transformCore" + #include "transformCoreVS" // include code for normal shader functionality provided by the engine. It automatically // declares vertex_normal attribute, and handles skinning and morphing if necessary. // Functions added: getNormalMatrix, getLocalNormal - #include "normalCore" + #include "normalCoreVS" // add additional attributes we need attribute vec2 aUv0; diff --git a/examples/assets/scripts/misc/hatch-material.mjs b/examples/assets/scripts/misc/hatch-material.mjs index 19f6dbd9565..7a3dd4a98f3 100644 --- a/examples/assets/scripts/misc/hatch-material.mjs +++ b/examples/assets/scripts/misc/hatch-material.mjs @@ -39,12 +39,12 @@ const createHatchMaterial = (device, textures) => { // declares vertex_position attribute, and handles skinning and morphing if necessary. // It also adds uniforms: matrix_viewProjection, matrix_model, matrix_normal. // Functions added: getModelMatrix, getLocalPosition - #include "transformCore" + #include "transformCoreVS" // include code for normal shader functionality provided by the engine. It automatically // declares vertex_normal attribute, and handles skinning and morphing if necessary. // Functions added: getNormalMatrix, getLocalNormal - #include "normalCore" + #include "normalCoreVS" // add additional attributes we need attribute vec2 aUv0; diff --git a/src/scene/shader-lib/chunks/common/vert/transformCore.js b/src/scene/shader-lib/chunks/common/vert/transformCore.js index b0d2bdaa0d7..28a976ac38b 100644 --- a/src/scene/shader-lib/chunks/common/vert/transformCore.js +++ b/src/scene/shader-lib/chunks/common/vert/transformCore.js @@ -50,7 +50,7 @@ uniform mat3 matrix_normal; #elif defined(INSTANCING) - #include "transformInstancing" + #include "transformInstancingVS" #else diff --git a/src/scene/shader-lib/chunks/lit/vert/base.js b/src/scene/shader-lib/chunks/lit/vert/base.js index 1a5f72a5237..88ef7765453 100644 --- a/src/scene/shader-lib/chunks/lit/vert/base.js +++ b/src/scene/shader-lib/chunks/lit/vert/base.js @@ -7,5 +7,5 @@ attribute vec4 vertex_color; vec3 dPositionW; mat4 dModelMatrix; -#include "transformCore" +#include "transformCoreVS" `; diff --git a/src/scene/shader-lib/programs/lit-shader.js b/src/scene/shader-lib/programs/lit-shader.js index 3b48ef2c7bf..5491afb4c18 100644 --- a/src/scene/shader-lib/programs/lit-shader.js +++ b/src/scene/shader-lib/programs/lit-shader.js @@ -1537,8 +1537,8 @@ class LitShader { getDefinition(options) { const vIncludes = new Map(); - vIncludes.set('transformCore', this.chunks.transformCoreVS); - vIncludes.set('transformInstancing', this.chunks.transformInstancingVS); + vIncludes.set('transformCoreVS', this.chunks.transformCoreVS); + vIncludes.set('transformInstancingVS', this.chunks.transformInstancingVS); vIncludes.set('skinTexVS', this.chunks.skinTexVS); vIncludes.set('skinBatchTexVS', this.chunks.skinBatchTexVS); diff --git a/src/scene/shader-lib/programs/shader-generator-shader.js b/src/scene/shader-lib/programs/shader-generator-shader.js index 705df7d4d5e..c64b009a1f7 100644 --- a/src/scene/shader-lib/programs/shader-generator-shader.js +++ b/src/scene/shader-lib/programs/shader-generator-shader.js @@ -81,10 +81,9 @@ class ShaderGeneratorShader extends ShaderGenerator { includes.set('shaderPassDefines', shaderPassInfo.shaderDefines); includes.set('userCode', desc.vertexCode); - includes.set('transformCore', shaderChunks.transformCoreVS); - includes.set('transformInstancing', ''); // no default instancing, needs to be implemented in the user shader - includes.set('normalCore', shaderChunks.normalCoreVS); - includes.set('skinCode', shaderChunks.skinTexVS); + includes.set('transformCoreVS', shaderChunks.transformCoreVS); + includes.set('transformInstancingVS', ''); // no default instancing, needs to be implemented in the user shader + includes.set('normalCoreVS', shaderChunks.normalCoreVS); includes.set('skinTexVS', shaderChunks.skinTexVS); if (options.skin) defines.set('SKIN', true);