I can't figure out how to do normal alpha testing in openGL ES 2.0 on the android platform. I have tried to setup the blending factors exactly like in ES 1.1 where i get it to work, but in 2.0 it doesn't do a difference. I know that ES 2.0 is completely shader based and you are suppose to achieve many blending effects in the shader, but from what i have understood you can only to fully transparent stuff with the "discard" syntax in the shader. (unless you use multi texturing and blend the two textures together with some formula, but thats not blending with the render target.).
So what am i missing here?
Thanx for any help!
//Tobias
Half transparent textures in openGL ES 2.0?
I can't figure out how to do normal alpha testing in openGL ES 2.0 on the android platform. I have tried to setup the blending factors exactly like in ES 1.1 where i get it to work, but in 2.0 it doesn't do a difference. I know that ES 2.0 is completely shader based and you are suppose to achieve many blending effects in the shader, but from what i have understood you can only to fully transparent stuff with the "discard" syntax in the shader. (unless you use multi texturing and blend the two textures together with some formula, but thats not blending with the render target.).
So what am i missing here?
Thanx for any help!
//Tobias
Isn't there glEnable(GL_BLEND) and glBlendFunc in OpenGL ES?
[quote name='Mockarutan' timestamp='1299267556' post='4781846']
I can't figure out how to do normal alpha testing in openGL ES 2.0 on the android platform. I have tried to setup the blending factors exactly like in ES 1.1 where i get it to work, but in 2.0 it doesn't do a difference. I know that ES 2.0 is completely shader based and you are suppose to achieve many blending effects in the shader, but from what i have understood you can only to fully transparent stuff with the "discard" syntax in the shader. (unless you use multi texturing and blend the two textures together with some formula, but thats not blending with the render target.).
So what am i missing here?
Thanx for any help!
//Tobias
Isn't there glEnable(GL_BLEND) and glBlendFunc in OpenGL ES?
[/quote]
It works.... I'm embarrassed xD I guess i misunderstood a text a reed in an openGL ES 2.0 book:
Alpha test and LogicOp are no longer part of the per-fragment
operations stage. These two stages exist in OpenGL 2.0 and OpenGL
ES 1.x. The alpha test stage is no longer needed because the fragment
shader can discard fragments and therefore the alpha test can be
performed in the fragment shader. In addition, LogicOp is removed
as it is very infrequently used by applications and the OpenGL ES
working group did not get requests from independent software
vendors (ISVs) to support this feature in OpenGL ES 2.0.
[/quote]
Thanx!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement