Explorar o código

WebGLRenderer3: Added @MiiBond improvements.

Mr.doob %!s(int64=12) %!d(string=hai) anos
pai
achega
c3702b0d0e
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      examples/js/renderers/WebGLRenderer3.js

+ 3 - 0
examples/js/renderers/WebGLRenderer3.js

@@ -202,6 +202,7 @@ THREE.WebGLRenderer3 = function ( parameters ) {
 
 		var vertexShader = [
 			'precision ' + precision + ' float;',
+			"precision " + precision + " int;",
 			'attribute vec3 position;',
 			'attribute vec3 normal;',
 			'uniform mat4 modelViewMatrix;',
@@ -212,6 +213,7 @@ THREE.WebGLRenderer3 = function ( parameters ) {
 
 		var fragmentShader = [
 			'precision ' + precision + ' float;',
+			"precision " + precision + " int;",
 			''
 		].join( '\n' );
 
@@ -279,6 +281,7 @@ THREE.WebGLRenderer3 = function ( parameters ) {
 
 			} else {
 
+				console.error( 'Program Info Log: ' + gl.getProgramInfoLog( program ) );
 				console.error( 'VALIDATE_STATUS: ' + gl.getProgramParameter( program, gl.VALIDATE_STATUS ) );
 				console.error( 'GL_ERROR: ' + gl.getError() );