how can i light a Texture2D ??

Started by
2 comments, last by Daivuk 16 years, 2 months ago
i put a photo in the game and i want to light it (when the mouse cursor come on it) as i put a torch on it. IN XNA thanks in advanced [Edited by - amr eshra on February 20, 2008 9:10:15 AM]
Advertisement
Write a pixel shader, pass the current mouse coordinates to it, and have the color it returns dependent on that.
little more detail:

http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/Lighting_basics.php

-me
Or:

render the light quad (Just a radiant gradient) with the color of the light.
Then multiply your texture on it.

Pixel shaders might be overkill to acheive that.

This topic is closed to new replies.

Advertisement