
The way I envisioned this is to allow using custom vertex and pixel shaders. With this it should be possible to implement normal maps and many other things without touching the engine code. Internally, a shader is used already for all objects, but it is not customizable. However, I am very busy until at least August, so I probably won't get to it until then...
This should now be possible, at least object-space normal maps. You'll have to write a GLSL shader, or I can possibly do it for you if you give me an object to play with.
So I have tried this out with the wolf mesh that is in the resources repository, since it also has a normal map. I don't know how good that normal map is, but here is the result. Maybe someone can confirm that this looks correct? (light is always coming from "outside" the screen)

Are you interested in collaborating in the lights branch? Sooner or later, we got to work together there. I am still in the process of reading in and documenting the code, but I can say so much as that all the calculations made about the light end up in a texture that should have all the information about the light needed for every pixel on the screen - strength of light, direction of light.
Maybe it would be good to assemble a specific list of tasks that needs to be done in the lights branch?
In order to use a normal map, derive your material from the "NormalMap" material, and name the normal texture "base" and the normal map texture "normal". Note that the technique and pass need an index "0", to overwrite the technique or pass from the inherited material, otherwise an additional technique or pass would be created. Here is an example:
material WolfNormal: NormalMap
{
technique 0
{
pass 0
{
ambient 1.0 1.0 1.0 1.0
diffuse 0.8 0.8 0.8 1.0
specular 0.0 0.0 0.0 1.0 12.5
emissive 0.0 0.0 0.0 1.0
texture_unit base
{
texture wolf.png
tex_address_mode wrap
}
texture_unit normal
{
texture wolf_normal.png
tex_address_mode wrap
}
}
}
}
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill