浏览代码

Update WebGLUtils for WebGL 2.0 UNSIGNED_INT_24_8

Takahiro 7 年之前
父节点
当前提交
f02117fe85
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/renderers/webgl/WebGLUtils.js

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

@@ -142,7 +142,7 @@ function WebGLUtils( gl, extensions ) {
 
 			extension = extensions.get( 'WEBGL_depth_texture' );
 
-			if ( extension !== null ) return extension.UNSIGNED_INT_24_8_WEBGL;
+			if ( extension !== null ) return isWebGL2 ? extension.UNSIGNED_INT_24_8 : extension.UNSIGNED_INT_24_8_WEBGL;
 
 		}