Hello!

I'm about to do a dirty hack for my game. Let's agree that this is terrible and I shouldn't be doing this. Also, let's do it.


In my game, many entities are models that are actually flat (like sprites)! This causes dynamic lighting to look "wrong", since they're shaded like models. This means that if I move "in front of" a lightsource, the model turns "dark", which makes sense, but is not what I want.

I figured - well, it means that in the calculation of the dotProduct, I'd need to replace the y-coordinate calculation with something like -abs(LightDir.y * Normal.y).

But the thing is - the entity uses mtl_model. Changing that now would be a pain. And even if it weren't, I still don't have a shader ready with Fog, Lighting and all that jazz. Is there one readily available? (I am aware that it shouldn't be too hard to do it, but I'm kinda cautious with turning this into a shader).


So my other idea was: Why not simply change the vecLightPos-information that DoLight (in default.fx) is using?
But I can't. I cannot change those values in the material event.



What can I do to render the (flat) model as a Sprite, as far as lighting is concerned?


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!