Here’s an example using the feature:
In your code, you don’t need to do any replace like in the example but instead you need to inline the code by doing:
const sci = new BABYLON.ShaderCodeInliner(code);
sci.inlineToken = "#define pbr_inline";
sci.processCode();
return sci.code;
No, you don’t need to do this anymore once you use processFinalCode
.
1 Like