Shaders and alpha

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.

Shaders and alpha

Postby Klunk » Fri Nov 18, 2011 9:55 pm

should i expect the same results in the way irrlicht handles alpha (both blend & additive) with internal materials and how it handles it with shaders ?

if i have 2 crossing quads with material type set to EMT_TRANSPARENT_ADD_COLOR or EMT_TRANSPARENT_ALPHA_CHANNEL irrlicht handles the face sorting just fine. Now If i create a GLSL shader material type using addHighLevelShaderMaterialFromFiles , and pass EMT_TRANSPARENT_ADD_COLOR or EMT_TRANSPARENT_ALPHA_CHANNEL as the baseMaterial type The alpha sorting on the faces doesn't happen.

Is this just the way it is ?

Image

shader version using EMT_TRANSPARENT_ALPHA_CHANNEL as the baseMaterial at the back , irrlicht material with type set to EMT_TRANSPARENT_ALPHA_CHANNEL in the front.

gets even more confusing if i set ZWriteEnable to false on the shader material it will work as the built in irrlicht material (not that surprising) but is still z sorted against other objects !!! :shock: :?
Klunk
 
Posts: 226
Joined: Mon Jan 10, 2011 5:21 pm

Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 1 guest