浏览代码

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.";