* Added new uniform binding WorldMatrixInverseTranspose (thanks kwando)
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9197 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
7c999dc4cd
commit
ea0617fa81
@ -380,6 +380,11 @@ public class RenderManager {
|
|||||||
tempMat4.invertLocal();
|
tempMat4.invertLocal();
|
||||||
u.setValue(VarType.Matrix4, tempMat4);
|
u.setValue(VarType.Matrix4, tempMat4);
|
||||||
break;
|
break;
|
||||||
|
case WorldMatrixInverseTranspose:
|
||||||
|
worldMatrix.toRotationMatrix(tempMat3);
|
||||||
|
tempMat3.invertLocal().transposeLocal();
|
||||||
|
u.setValue(VarType.Matrix3, tempMat3);
|
||||||
|
break;
|
||||||
case ViewMatrixInverse:
|
case ViewMatrixInverse:
|
||||||
tempMat4.set(viewMatrix);
|
tempMat4.set(viewMatrix);
|
||||||
tempMat4.invertLocal();
|
tempMat4.invertLocal();
|
||||||
|
@ -79,6 +79,14 @@ public enum UniformBinding {
|
|||||||
*/
|
*/
|
||||||
ViewProjectionMatrix,
|
ViewProjectionMatrix,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The world matrix inverse transpose. Converts a normals from Model space
|
||||||
|
* to world space.
|
||||||
|
* Type: mat3
|
||||||
|
*/
|
||||||
|
WorldMatrixInverseTranspose,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WorldMatrixInverse,
|
WorldMatrixInverse,
|
||||||
ViewMatrixInverse,
|
ViewMatrixInverse,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user