提交 560562c0 编写于 作者: A alteredq

Removed cameraInverseMatrix uniform.

This was redundant as viewMatrix uniform is the same thing.
上级 82256dc7
此差异已折叠。
此差异已折叠。
......@@ -4278,7 +4278,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( material.skinning ) {
loadUniformsSkinning( p_uniforms, object, camera );
_gl.uniformMatrix4fv( p_uniforms.boneGlobalMatrices, false, object.boneMatrices );
}
......@@ -4475,14 +4475,6 @@ THREE.WebGLRenderer = function ( parameters ) {
// Uniforms (load to GPU)
function loadUniformsSkinning ( uniforms, object, camera ) {
_gl.uniformMatrix4fv( uniforms.cameraInverseMatrix, false, camera._viewMatrixArray );
_gl.uniformMatrix4fv( uniforms.boneGlobalMatrices, false, object.boneMatrices );
};
function loadUniformsMatrices ( uniforms, object ) {
_gl.uniformMatrix4fv( uniforms.modelViewMatrix, false, object._modelViewMatrixArray );
......@@ -5128,8 +5120,6 @@ THREE.WebGLRenderer = function ( parameters ) {
"uniform mat3 normalMatrix;",
"uniform vec3 cameraPosition;",
"uniform mat4 cameraInverseMatrix;",
"attribute vec3 position;",
"attribute vec3 normal;",
"attribute vec2 uv;",
......@@ -5227,7 +5217,7 @@ THREE.WebGLRenderer = function ( parameters ) {
identifiers = [
'viewMatrix', 'modelViewMatrix', 'projectionMatrix', 'normalMatrix', 'objectMatrix', 'cameraPosition',
'cameraInverseMatrix', 'boneGlobalMatrices', 'morphTargetInfluences'
'boneGlobalMatrices', 'morphTargetInfluences'
];
......
......@@ -669,9 +669,6 @@ THREE.ShaderChunk = {
"gl_Position = ( boneGlobalMatrices[ int( skinIndex.x ) ] * skinVertexA ) * skinWeight.x;",
"gl_Position += ( boneGlobalMatrices[ int( skinIndex.y ) ] * skinVertexB ) * skinWeight.y;",
// this doesn't work, no idea why
//"gl_Position = projectionMatrix * cameraInverseMatrix * objectMatrix * gl_Position;",
"gl_Position = projectionMatrix * viewMatrix * objectMatrix * gl_Position;",
"#endif"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册