Rendering and Shaders: Difference between revisions
Jump to navigation
Jump to search
(Created page with "==MAX Exporter== Valid map slots to be used are Diffuse, Specular Colour, Glossiness, and Bump (which is the normal map). The exporter should correctly handle baked materials...") |
|||
Line 12: | Line 12: | ||
When writing shaders, the following registers can be assumed to be filled | When writing shaders, the following registers can be assumed to be filled | ||
world matrix c0 | *world matrix c0 | ||
view matrix c4 | *view matrix c4 | ||
projection matrix c8 | *projection matrix c8 | ||
WVP combo c12 | *WVP combo c12 | ||
light data (dir, colour, ambient) c16 | *light data (dir, colour, ambient) c16 | ||
world Normal matrix c20 | *world Normal matrix c20 | ||
shadowmap lighting trx combo c24 | *shadowmap lighting trx combo c24 | ||
camera position vector c28 | *camera position vector c28 | ||
c29-31 not used yet | *c29-31 not used yet | ||
c32 assume all past here are bones | *c32 assume all past here are bones |
Revision as of 17:15, 16 October 2015
MAX Exporter
Valid map slots to be used are Diffuse, Specular Colour, Glossiness, and Bump (which is the normal map). The exporter should correctly handle baked materials. The maps are available in the game shaders in the following order in samplers [0-3].
Diffuse Normal Specular Gloss
NOTE: object names must not exceed 22 characters.
Shader input data
When writing shaders, the following registers can be assumed to be filled
- world matrix c0
- view matrix c4
- projection matrix c8
- WVP combo c12
- light data (dir, colour, ambient) c16
- world Normal matrix c20
- shadowmap lighting trx combo c24
- camera position vector c28
- c29-31 not used yet
- c32 assume all past here are bones