Hey,
I’ve been using some code I found in a thread here.
Basically this.
BABYLON.Effect.IncludesShadersStore["lightFragment"] = BABYLON.Effect.IncludesShadersStore["lightFragment"].replace(
"info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler{X},textureProjectionMatrix{X});",
`vec3 projCol = computeProjectionTextureDiffuseLighting(projectionLightSampler{X},textureProjectionMatrix{X});
baseColor.rgb *= projCol;
`
);
But now I need to make my material more complicated, and the standard shader is unlikely to work for what I’m trying to do. I’ve managed to create what I want in the Node Material Editor but I can’t get it to work with the code above.
Can I introduce a variable in the Node Material Editor that is editable in the light fragment?
I can’t find a way to amend the shader code that’s generated by the Node Material Editor. If I could work that out I think this is a pretty simple problem. (I could just add baseColor and apply it to the final function).
Thanks,
Chris