Browse Source

Update EXT_blend_minmax handling for WebGL 2.0

Takahiro 7 years ago
parent
commit
6065f4f7db
2 changed files with 4 additions and 3 deletions
  1. 2 1
      src/renderers/webgl/WebGLExtensions.js
  2. 2 2
      src/renderers/webgl/WebGLUtils.js

+ 2 - 1
src/renderers/webgl/WebGLExtensions.js

@@ -62,7 +62,8 @@ function WebGLExtensions( gl ) {
 						  'OES_element_index_uint',
 						  'OES_standard_derivatives',
 						  'EXT_frag_depth',
-						  'EXT_shader_texture_lod' ].indexOf( name ) >= 0 ) {
+						  'EXT_shader_texture_lod',
+						  'EXT_blend_minmax' ].indexOf( name ) >= 0 ) {
 
 						extension = gl;
 

+ 2 - 2
src/renderers/webgl/WebGLUtils.js

@@ -131,8 +131,8 @@ function WebGLUtils( gl, extensions ) {
 
 			if ( extension !== null ) {
 
-				if ( p === MinEquation ) return extension.MIN_EXT;
-				if ( p === MaxEquation ) return extension.MAX_EXT;
+				if ( p === MinEquation ) return isWebGL2 ? extension.MIN : extension.MIN_EXT;
+				if ( p === MaxEquation ) return isWebGL2 ? extension.MAX : extension.MAX_EXT;
 
 			}