• Advertisement
Sign in to follow this  

how can i light a Texture2D ??

This topic is 3650 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
Write a pixel shader, pass the current mouse coordinates to it, and have the color it returns dependent on that.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement