Explorar o código

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

Guillaume Fradin %!s(int64=5) %!d(string=hai) anos
pai
achega
093346d323
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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.";