Hello,
I have 2 entities with 2 different but similar scripts attached that make a mesh, shader and material. They use 2 different shaders but the uniform names are identical. In the scripts I’m using
app.graphicsDevice.scope.resolve to then setValue to update the uniforms.
What’s happening now is that when I modify the uniform (via script attribute in the editor), it also affects the uniform with the same name of the shader on the other entity.
I feel like I’m missing a bit of information about the engine… how is it supposed to work when all uniforms are resolved from the same app.graphicsDevice.scope object?
Is there a method I can call to make a shader/material the current one so that a call to setValue is applied to only the right uniform? What am I missing?
Thanks in advance!