Proposed Shader for Unity3D
I want to build an fairly high level shader. Here are initial thoughts on features or passes the shader should have.
0. Vertex Colours (RGB)
1. Color Map (RGB Color, A Illumination)
2. Normal Map
3. Specular Map (RGB Color, A Shininess)
5. Environment Cube Map
The specular map is used for environment mapping, in that the Alpha channel shows which parts of the model will be shiny, and therefore reflect the environment. The RGB channels in the specular map are used to tint the colour of the reflection. The reflected texture should follow the distortions created by the normal map.
Vertex colours are used to tint the model, and will be used for fake ambient lighting effects.
The shader should fallback to using passes 0,1,2 and 3, Then fallback to 0,1 and 2 and finally fallback to 0 and 1 as quality is reduced.
The shader must also have a global colour attribute which will change the tint of the model, as is usual with Unity3D shaders.
The shader must also do whatever magic is needed in order to cast and receive shadows.