Hi!
I'm trying to make a fragment shader that displaces 2 textures (normal maps) on one of its coordinates using a uniform timer. I have a small static class that manages this with an update method called on each frame that increases the timer. The shader is linked to an object3D and works well except that the textures don't get displaced, as if the uniform timer didn't get updated.
This is a simplified version of what my java class does to the shader:
public class myShaderManager{
public static int timer=0;
static GLSLShader myShader;
public static void update()
{
timer=timer+1;
myShader.setUniform("timer", (float)timer);
}
}
Am I doing the set uniform part wrong?. For some reason I'm using the exact same shader on another project (openGLES2 only, shaders only differ in naming) and it works well so i'm getting a bit confused and just decided to ask here as I've learned a lot of things in these forums
I can also provide some shader code if needed.