Help with Shaders rendering (vertical gradients result in plain color)

Started by _gjkf_, July 24, 2016, 09:17:45

Previous topic - Next topic


Good morning everyone,

My problem is with shaders. Especially gradients. I've made a couple of them and they work fine, as long as the gradient is horizontal. If I try to make it vertical, it's just a plain color (the ending one of the gradient).
The gradient shader:
The shader renderer: (Note that I pass some uniforms as an HashMap and that works)
And finally where I draw:

I think that should be all. I know it's a lot but I'm really struggling with these.
If you need anything else, feel free to ask.
Thanks for your time.

EDIT: I've added a couple of more problems I have, sorry :(
EDIT: I've solved the Image one, the other 2 still persist.
EDIT: I've solved the Font one, the Shader still causes problems.


The drawText method calls glPushMatrix() twice but glPopMatrix() only once.


Thanks for the tip but still not works. The problem persists and nothing really changed.