Hello
Guest
Register
Login
1 Hour
1 Day
1 Week
1 Month
Forever
LWJGL 3.3.2 released
Menu
Home
Help
Search
Login
Register
go
LWJGL Forum
Programming
OpenGL
Help with Shaders rendering (vertical gradients result in plain color)
« previous
next »
Print
Pages: [
1
]
Help with Shaders rendering (vertical gradients result in plain color)
2 Replies
3801 Views
_gjkf_
9
Help with Shaders rendering (vertical gradients result in plain color)
«
on:
July 24, 2016, 09:17:45 »
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).
Code:
The gradient shader:
https://github.com/gjkf/seriousEngine/blob/master/src/main/resources/shaders/gradient.glsl
The shader renderer:
https://github.com/gjkf/seriousEngine/blob/master/src/main/java/com/gjkf/seriousEngine/core/render/Renderer.java#L269-L352
(Note that I pass some uniforms as an HashMap and that works)
And finally where I draw:
https://github.com/gjkf/seriousEngine/blob/master/src/main/java/com/gjkf/seriousEngine/core/render/Renderer.java#L269-L335
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.
«
Last Edit: August 03, 2016, 16:15:50 by _gjkf_
»
Logged
spasi
2256
Re: Help with Font rendering
«
Reply #1 on:
July 24, 2016, 11:51:03 »
The drawText method calls glPushMatrix() twice but glPopMatrix() only once.
Logged
_gjkf_
9
Re: Help with Font rendering
«
Reply #2 on:
July 24, 2016, 14:19:18 »
Thanks for the tip but still not works. The problem persists and nothing really changed.
Logged
Print
Pages: [
1
]
« previous
next »