BGE Bugfix for [#22371] Alpha Planes affecting 2DFilters
disabling GL_Blend at the 2dfilter drawing routine makes the trick here. there is not a clear function invoked before the 2dfilter drawing routine. Therefore I found better to disable alpha blending while we are setting the other OpenGl attributes/matrixes. We are not re-enabling GL_BLEND after we disable it. We could and it wouldn't hurt but I can't see why to. open to suggestions here of course.
This commit is contained in:
@@ -431,6 +431,8 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
|
||||
glViewport(0,0, texturewidth, textureheight);
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
// if the last rendered face had alpha add it would messes with the color of the plane we apply 2DFilter to
|
||||
glDisable(GL_BLEND);
|
||||
glPushMatrix(); //GL_MODELVIEW
|
||||
glLoadIdentity(); // GL_MODELVIEW
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
|
Reference in New Issue
Block a user