Quote:

Could you make it so that it react to the direction of dynamic lighting?


Dynamic lighting uses the position of the dyn light as it should ...

Only static lighting must fake light direction. here's how it works:
Static light positions are not stored, only the lightmaps they create. Therefore, to get the color of static lighting, you must simply use traces to get the colors from the lightmap around your model. This shader simply does a downward trace from the origin of the model, and passes the color to the shader. Since we do not know the position, we must tell the shader where to illuminate from. So I decided to use the suns position/angle for this.


xXxGuitar511
- Programmer