Browse Source

Merge pull request #12024 from markusjohnsson/samplers_in_struct_uniforms

Fix for samplers in struct uniforms
Mr.doob 7 years ago
parent
commit
201c036389
1 changed files with 2 additions and 5 deletions
  1. 2 5
      src/renderers/webgl/WebGLUniforms.js

+ 2 - 5
src/renderers/webgl/WebGLUniforms.js

@@ -696,17 +696,14 @@ function StructuredUniform( id ) {
 
 }
 
-StructuredUniform.prototype.setValue = function ( gl, value ) {
-
-	// Note: Don't need an extra 'renderer' parameter, since samplers
-	// are not allowed in structured uniforms.
+StructuredUniform.prototype.setValue = function ( gl, value, renderer ) {
 
 	var seq = this.seq;
 
 	for ( var i = 0, n = seq.length; i !== n; ++ i ) {
 
 		var u = seq[ i ];
-		u.setValue( gl, value[ u.id ] );
+		u.setValue( gl, value[ u.id ], renderer );
 
 	}