Skip to content

Commit

Permalink
Support chunks to be included by VS of ShaderMaterial (#7276)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Valigursky <[email protected]>
  • Loading branch information
mvaligursky and Martin Valigursky authored Jan 13, 2025
1 parent eef5440 commit ba521d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scene/shader-lib/programs/shader-generator-shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ class ShaderGeneratorShader extends ShaderGenerator {
definitionOptions.vertexCode = desc.vertexCode;

} else {
const includes = new Map();
const includes = new Map(Object.entries({
...shaderChunks,
...options.chunks
}));
const defines = new Map(options.defines);

includes.set('shaderPassDefines', shaderPassInfo.shaderDefines);
Expand Down

0 comments on commit ba521d5

Please sign in to comment.