Recommended Posts

I was wondering if it is possible to use the lighting routines like you would for 3D applications but on a sprite. I've created a lighting effect using alpha blending but I think it would be a bit nicer to have use of the lighting routines. Reason why is using the alpha blending leaves a decent light radius effect, but it is blocky and would like to create a smooth circular light around the character. Here is a pic of what I have right now using alpha blending. I've tried using the lighting routines before, but can't seem to get them to show up. Can't figure if i'm just positioning the lights wrong, or what.
http://www.forgottenstar.com/EE/3d-ss8.jpg
Thanks
Slyprid

Share this post

Link to post

Share on other sites

Well I got the lighting to work with creating my own primitives and tiles, but was still wondering if its possible to add lighting to d3dx.sprite class. The main reason was since my program already uses the class already, and don't want to go back through and write a new class for it all, but if I have to I will. Even though using masking and alpha blending will do the trick, I figured since the lighting routines were already there I should be able to use them. Sorry keep asking about this, but i'm still new to the whole 3D aspect of programming and trying to learn. I did find out that you have to assign a material to an object in order for it to have lighting on it, so is there a way to assign a material to a sprite class? Once again, thanks for your time.