Page 1 of 1

Mesh transparency

Posted: Wed Aug 16, 2017 8:31 am
by mant
I created new GLSL material and its base type is TRANSPARENT_VERTEX_ALPHA.
But calling IMeshManipulator::setVertexColorAlpha(IAnimatedMesh*, value) doesn't change it's opacity.
Do I have to change something else?

Re: Mesh transparency

Posted: Wed Aug 16, 2017 9:42 am
by CuteAlien
Are you using the vertex color in your shader? The way you do that depends on if you work with OGL ES2 or with OpenGL. In ES2 Irrlicht passes on the variable "inVertexColor". In OpenGL I'm not certain right now (I have no example for that...), but it's probably called gl_Color.
You pass that on the pixel-shader with a varying variable and use it to calculate the final color there.

Re: Mesh transparency

Posted: Wed Aug 30, 2017 9:56 pm
by mant
I haven't come back to this, will try to update as soon as possible.