I'm trying to make an OpenGL shader that will allow drawing several polygons with alphamaps behind each other.
Transparency in OpenGL is a basic problem. Read more on it here: http://www.opengl.org/wiki/Transparency_Sorting
I think any of those tricks described on the wiki would be perfect!
Changing the texture modulation and the blending parameters of the OGLAlphaTrans node didn't give any good results.
I have tried adding some code snippets into a basic GLSL shader, but it just gives me errors, and I have no OpenGL experience
The fact that my netview is broken (only links to autodesk site) since XSI 7.0 doesn't help at all...
My question is: Can someone with a little OpenGL experience come up with (or direct me to) a shader that discards transparent pixels when writing to the z-buffer? Or any other fix for the transparency?
On the wiki this is mentioned:
Code: Select all
glAlphaFunc ( GL_GREATER, 0.1 ) ;
glEnable ( GL_ALPHA_TEST ) ;
-Michael