Pārlūkot izejas kodu

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

Guillaume Fradin 5 gadi atpakaļ
vecāks
revīzija
093346d323
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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.";