Skip to main content
gamedev.net
🔒 Locked

Projective texturing

Started by nemesisgeek Oct 8, 2005 at 3:02 PM 2 replies 700+ views
Original Post
nemesisgeek
nemesisgeek
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.
hackerkey://v4sw7+8CHS$hw6+8ln6pr8O$ck4ma4+9u5Lw7VX$m0l5Ri8ONotepad++/e3+8t3b8AORTen7+9a17s0r4g8OP
DrewGreen
DrewGreen
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.
"I must not fear. Fear is the mindkiller. Fear is the little death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past me I will turn to see fear's path. Where the fear has gone there will be nothing. Only I will remain." ~Frank Herbert, DuneMy slice of the web
Digitalfragment
Digitalfragment
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.