@@ -1091,9 +1091,7 @@ class OpenGLRenderer extends DisplayObjectRenderer
10911091
10921092 __context3D .__usingComplexBlend = true ;
10931093 switch (value ) {
1094- case DARKEN :
1095- if (__context3D .__usingComplexBlend = ! __blendMinMaxSupported )
1096- __context3D .__setGLBlendEquation (0x9297 ); // DARKEN_KHR
1094+ case DARKEN : __context3D .__setGLBlendEquation (0x9297 ); // DARKEN_KHR
10971095 case DIFFERENCE : __context3D .__setGLBlendEquation (0x929E ); // DIFFERENCE_KHR
10981096 case HARDLIGHT : __context3D .__setGLBlendEquation (0x929B ); // HARDLIGHT_KHR
10991097 case LIGHTEN :
@@ -1123,11 +1121,13 @@ class OpenGLRenderer extends DisplayObjectRenderer
11231121 case DARKEN :
11241122 if (__blendMinMaxSupported )
11251123 {
1126- __context3D .setBlendFactors (ONE , ONE_MINUS_SOURCE_ALPHA );
1124+ // Transparency doesn't fully work with this, so it needs khronos extension version of DARKEN instead.
1125+ __context3D .setBlendFactors (ONE , ONE );
11271126 __context3D .__setGLBlendEquation (0x8007 ); // GL_MIN
11281127 }
11291128 else
11301129 {
1130+ // Alternative innacurate implementation if unsupported
11311131 __context3D .setBlendFactors (DESTINATION_COLOR , ONE_MINUS_SOURCE_ALPHA );
11321132 }
11331133 case ERASE : __context3D .setBlendFactors (ZERO , ONE_MINUS_SOURCE_ALPHA );
@@ -1140,6 +1140,7 @@ class OpenGLRenderer extends DisplayObjectRenderer
11401140 }
11411141 else
11421142 {
1143+ // Alternative innacurate implementation if unsupported
11431144 __context3D .setBlendFactors (ONE , ONE );
11441145 }
11451146 case MULTIPLY : __context3D .setBlendFactors (DESTINATION_COLOR , ONE_MINUS_SOURCE_ALPHA );
0 commit comments