Materials (Metroid Prime): Difference between revisions

Jump to navigation Jump to search
m
>Aruki
>Aruki
Line 604: Line 604:
This mode is commonly used with vertex normals to simulate reflective surfaces using spheremaps that move with the camera. It takes no parameters, and will generate both a texture matrix and a post-transform matrix. Translation is ignored.
This mode is commonly used with vertex normals to simulate reflective surfaces using spheremaps that move with the camera. It takes no parameters, and will generate both a texture matrix and a post-transform matrix. Translation is ignored.


The texture matrix is calculated like this. Note that the multiplication of the view matrix by the model matrix should be modified slightly rather than being a straight multiplication to ignore translation on the model matrix.
The texture matrix is calculated like this. Note that the multiplication of the view matrix by the model matrix should be modified slightly rather than being a straight multiplication to ignore translation on the model matrix. (The game uses a function called MultiplyIgnoreTranslation for this.)


<pre>texmtx = inverse(ViewMatrix) * ModelMatrix;
<pre>texmtx = inverse(ViewMatrix) * ModelMatrix;
Anonymous user

Navigation menu