Jump to content
  • Advertisement
Sign in to follow this  
nemesisgeek

Projective texturing

This topic is 4781 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

Does anyone have any idea as to how I could go about doing projective texturing? I am writing an FPS game and want my tracers to light up their surroundings, but having 10 lights (if two ppl each fire 5 shots) is a little impractical.

Share this post


Link to post
Share on other sites
Advertisement
I could be speaking out of my backside here but it should be possible for you to use one light for any number of shots - update the light before drawing each shot (or calculating positions or whatever), as long as it's within a single rendering pass this should work.

Share this post


Link to post
Share on other sites
DrewGreen: Yes you would. That cant be done as the 10 lights need to light the same geometry.

You use 3 planes that point along the x, y & z axis respectivly, each offset so that their intersection point is the origin of the lightsource. Scale the normal of each plane to adjust the radius of the light. Use these as the object planes for S T & R in glTexEnv. That should give you a good basis to work from - i hope. But still, check the documentation on Projective Textures on the NVidia site.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!