提交 a6f009e5 编写于 作者: M Mr.doob

WebGLUniforms: Pass material to Uniform.onUpdate. See #9637.

上级 63eeb185
......@@ -602,7 +602,7 @@
var vert = document.getElementById( 'vertMaterial' ).textContent;
var frag = document.getElementById( 'fragMaterial' ).textContent;
function updateColor( object, camera ) {
function updateColor( object, material, camera ) {
this.value.setHex( object.userData.color );
......
......@@ -1971,9 +1971,7 @@ function WebGLRenderer( parameters ) {
if ( dynUniforms !== null ) {
WebGLUniforms.evalDynamic(
dynUniforms, m_uniforms, object, camera );
WebGLUniforms.evalDynamic( dynUniforms, m_uniforms, object, material, camera );
WebGLUniforms.upload( _gl, dynUniforms, m_uniforms, _this );
}
......
......@@ -575,14 +575,14 @@ WebGLUniforms.splitDynamic = function( seq, values ) {
};
WebGLUniforms.evalDynamic = function( seq, values, object, camera ) {
WebGLUniforms.evalDynamic = function( seq, values, object, material, camera ) {
for ( var i = 0, n = seq.length; i !== n; ++ i ) {
var v = values[ seq[ i ].id ],
f = v.onUpdateCallback;
if ( f !== undefined ) f.call( v, object, camera );
if ( f !== undefined ) f.call( v, object, material camera );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册