提交 82acc598 编写于 作者: A alteredq

Merge remote-tracking branch 'remotes/AddictArts/dev_uniformV4v' into dev

...@@ -4589,6 +4589,29 @@ THREE.WebGLRenderer = function ( parameters ) { ...@@ -4589,6 +4589,29 @@ THREE.WebGLRenderer = function ( parameters ) {
} }
_gl.uniform3fv( location, uniform._array ); _gl.uniform3fv( location, uniform._array );
// array of THREE.Vector4
} else if( type == "v4v" ) {
if ( ! uniform._array ) {
uniform._array = new Float32Array( 4 * value.length );
}
for ( i = 0, il = value.length; i < il; i ++ ) {
offset = i * 4;
uniform._array[ offset ] = value[ i ].x;
uniform._array[ offset + 1 ] = value[ i ].y;
uniform._array[ offset + 2 ] = value[ i ].z;
uniform._array[ offset + 3 ] = value[ i ].w;
}
_gl.uniform4fv( location, uniform._array );
// single THREE.Matrix4 // single THREE.Matrix4
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册