World matrix
by Westy · in Torque Game Engine Advanced · 08/18/2004 (5:55 am) · 2 replies
Im trying to do a diffuse lighting shader, but the method requires a world view projection matrix , and a world matrix.
Now i can get the projection matrix from VC_WORLD_PROJ, but what is a 'world matrix' and how do i access it in the shader? The concerning line is:
matWorld is described as the world matrix, but what is this in TSE? and how do i access it?
Now i can get the projection matrix from VC_WORLD_PROJ, but what is a 'world matrix' and how do i access it in the shader? The concerning line is:
Out.Norm = normalize(mul(Normal, matWorld)); // transform Normal and normalize it
matWorld is described as the world matrix, but what is this in TSE? and how do i access it?
About the author
#2
In my diffuse vertex lighting model I get the normal vector like so
All the calculation are done in the vertex shader so I don't pass it along.
As for VC_WORLD_PROJ there are several parts of TSE that have not be fully implimented, I presume this is one of such things.
I hope this helps
08/18/2004 (7:28 pm)
I belive the normal for the vertex is already multiplied by the world MatrixIn my diffuse vertex lighting model I get the normal vector like so
float3 normalVec = In.normal;
All the calculation are done in the vertex shader so I don't pass it along.
As for VC_WORLD_PROJ there are several parts of TSE that have not be fully implimented, I presume this is one of such things.
I hope this helps
Torque Owner Westy
And and see no shader declaration for world matrix. :(