소스 검색

check if webgl2 is used before checking for extension OES_texture_float, to avoid a console warning

Guillaume Fradin 5 년 전
부모
커밋
093346d323
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      examples/js/misc/GPUComputationRenderer.js

+ 2 - 2
examples/js/misc/GPUComputationRenderer.js

@@ -148,8 +148,8 @@ THREE.GPUComputationRenderer = function ( sizeX, sizeY, renderer ) {
 
 	this.init = function () {
 
-		if ( ! renderer.extensions.get( "OES_texture_float" ) &&
-			 ! renderer.capabilities.isWebGL2 ) {
+		if ( ! renderer.capabilities.isWebGL2 &&
+			 ! renderer.extensions.get( "OES_texture_float" ) ) {
 
 			return "No OES_texture_float support for float textures.";