I am rendering static meshes using compiled vertex arrays, and setting the lighting environment up for each instance of the mesh, depending on a pre-compiled list of which lights are visible to this mesh.
I want to implement dot3 mapping in my materials, but want to be able to render staticmeshes with colored lights.
It seems the only way to make this work would be to render the meshes with lighting, then render the normal map in a second pass. This means glBlend would have to be enabled in the second pass. Would the second pass objects have z-ordering problems with each other? Is there a better way to do this?
In other words, rendering a second pass means enabling glBlendFunc. Does that mean I have to calculate z-order for every bump mapped surface in the scene?
By the way, I only want simple bump mapping, so I am willing to just use the nearest/brightest light for the lighting direction, and jut use it for a little highlight, not actual “lighting”. This is more just like detail textures with a little directionality.
An alternate method would be to render a “color” texture on top of the bump map, so that colored lights can still be used…sort of.