Sprite shader not working

Hi,

I used tehflah’s code from this topic http://hub.jmonkeyengine.org/groups/graphics/forum/topic/how-to-animate-textures-in-jme3/.

But it doesn’t work. I see the quad but the texture is static.

Is the code wrong or do I need to do something to enable shaders?



I’m using jme3 beta.

My graphic chipset is AMD Radeon HD 6900



Thank you

I’ve tried the nightly build but it doesn’t work either.

Anything in the log?

Emm, feel stupid, overlooked this:



Aug 13, 2012 6:18:18 PM com.jme3.scene.Node attachChild

INFO: Child (Statistics View) attached to this node (Gui Node)



Aug 13, 2012 6:18:19 PM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation

INFO: Uniform m_m_ColorMap is not declared in shader [ShaderSource[name=scrollShader/scrollShader.vert, defines, type=Vertex, language=GLSL150], ShaderSource[name=Common/MatDefs/Misc/SimpleTextured.frag, defines, type=Fragment, language=GLSL150]].



Aug 13, 2012 6:18:19 PM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation

INFO: Uniform m_m_Scroll is not declared in shader [ShaderSource[name=scrollShader/scrollShader.vert, defines, type=Vertex, language=GLSL150], ShaderSource[name=Common/MatDefs/Misc/SimpleTextured.frag, defines, type=Fragment, language=GLSL150]].



Aug 13, 2012 6:18:19 PM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation

INFO: Uniform m_VertexColor is not declared in shader [ShaderSource[name=Common/MatDefs/Misc/Unshaded.vert, defines, type=Vertex, language=GLSL100], ShaderSource[name=Common/MatDefs/Misc/Unshaded.frag, defines, type=Fragment, language=GLSL100]].



Aug 13, 2012 6:18:20 PM com.jme3.renderer.lwjgl.LwjglRenderer cleanup

INFO: Deleting objects and invalidating state



Don’t know why it is looking for “m_m_Scroll”. Is this the problem?

Yes, that’s the problem … The thread is almost 2 years old, and we are no longer compatible with the materials used then. You will need to remove the m_ prefixes from the J3MD and Java code, but leave them intact in the vert and frag shaders.

Also, remove the FixedFunc technique entirely.

Thank you, it works

@raistm , you can try something from here: http://code.google.com/p/jme-glsl-shaders/ .