File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ import lime.math.Matrix4;
5555class OpenGLRenderer extends DisplayObjectRenderer
5656{
5757 @:noCompletion private static var __blendMinMaxSupported : Null <Bool >;
58+ @:noCompletion private static var __standardDerivativesSupported : Null <Bool >;
5859 @:noCompletion private static var __complexBlendsSupported : Null <Bool >;
5960 @:noCompletion private static var __coherentBlendsSupported : Null <Bool >;
6061 @:noCompletion private static var __sRGBWriteControlSupported : Null <Bool >;
@@ -172,6 +173,10 @@ class OpenGLRenderer extends DisplayObjectRenderer
172173 {
173174 __coherentBlendsSupported = exts .contains (" KHR_blend_equation_advanced_coherent" );
174175 }
176+ if (__standardDerivativesSupported == null )
177+ {
178+ __standardDerivativesSupported = exts .contains (" OES_standard_derivatives" );
179+ }
175180
176181 #if (js && html5)
177182 __softwareRenderer = new CanvasRenderer (null );
Original file line number Diff line number Diff line change @@ -627,6 +627,7 @@ class Shader
627627 }
628628
629629 var complexBlendsSupported = OpenGLRenderer .__complexBlendsSupported && isFragment ;
630+ var standardDerivativesSupported = OpenGLRenderer .__standardDerivativesSupported && isFragment ;
630631
631632 #if lime
632633 if (__context .__context .type == OPENGL )
@@ -653,6 +654,11 @@ class Shader
653654 #end
654655 }
655656
657+ if (standardDerivativesSupported )
658+ {
659+ extensions + = " #extension GL_OES_standard_derivatives : enable\n " ;
660+ }
661+
656662 // #version must be the first directive and cannot be repeated,
657663 // while #extension directives must be before any non-preprocessor tokens.
658664
You can’t perform that action at this time.
0 commit comments