Explorar el Código

SimulationRenderer: Fix COLOR_ATTACHMENT format bug in Firefox

Mugen87 hace 9 años
padre
commit
d94ee70109
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      examples/js/SimulationRenderer.js

+ 2 - 2
examples/js/SimulationRenderer.js

@@ -26,7 +26,7 @@ function SimulationRenderer( WIDTH, renderer ) {
 
 	}
 
-	if ( gl.getParameter( gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS ) == 0 ) {
+	if ( gl.getParameter( gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS ) === 0 ) {
 
 		alert( "No support for vertex shader textures!" );
 		return;
@@ -102,7 +102,7 @@ function SimulationRenderer( WIDTH, renderer ) {
 
 		rtPosition1 = getRenderTarget( THREE.RGBAFormat );
 		rtPosition2 = rtPosition1.clone();
-		rtVelocity1 = getRenderTarget( THREE.RGBFormat );
+		rtVelocity1 = getRenderTarget( THREE.RGBAFormat );
 		rtVelocity2 = rtVelocity1.clone();
 
 		simulator.renderTexture( dtPosition, rtPosition1 );