Jump to content

Missing auxiliary fragment shader alpha testing


photo

Recommended Posts

Problem

 

No auxiliary fragment shader alpha testing for materials with alpha testing enabled

 

Possible Fix

 

Changing shader code (e.g. for OpenGL) in fragment_...._auxiliary.shader from

 

uniform half4 auxiliary_color;

void main() {

half4 diffuse = texture2DAlpha(s_texture_1,gl_TexCoord[0].xy,1.0f);

gl_FragColor = auxiliary_color;
}

 

to

 

uniform half4 auxiliary_color;

void main() {

   #ifdef ALPHA
       texture2DAlphaDiscard(s_texture_1,gl_TexCoord[0].xy,1.0f);
   #endif

   gl_FragColor = auxiliary_color;
}

Link to comment
×
×
  • Create New...