if I do non ref then I get the transparency issue again.
It seems that when I remove the shaders from the leaves it work fine, so I guess its something in the shader code for them?
leaves.frag
Code: Select all
uniform sampler2D Texture;
varying vec4 Color;
void main()
{
gl_FragColor = texture2D( Texture, gl_TexCoord[0].xy ) * Color;
}
Code: Select all
varying vec4 Color;
void main()
{
Color = gl_Color;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
}
Code: Select all
leafMaterialType = (video::E_MATERIAL_TYPE) driver->getGPUProgrammingServices()->addHighLevelShaderMaterialFromFiles(
"shaders/trees/leaves.vert",
"main",
EVST_VS_2_0,
"shaders/trees/leaves.frag",
"main",
EPST_PS_2_0,
0,
EMT_TRANSPARENT_ALPHA_CHANNEL_REF,
0);
EDIT
I looked at the fire in example one and it does have the same issue, it is excluded but it lights up the wall behind it
I set the ambient color to black to show that the wall is not black behind the excluded fire.