lighting a big wall
I've gotten mad trying to get a small beam of light lighting a big wall (just one big quad).
in the end I dont manage to get it working nicely. i would expect a circle of light, but instead i get one of the two triangles that compose the quad light, the other one not.
Is this a limitation of opengl? Meaning i should divide the big wall in many smaller quads to achieve a better effect??
in the end I dont manage to get it working nicely. i would expect a circle of light, but instead i get one of the two triangles that compose the quad light, the other one not.
Is this a limitation of opengl? Meaning i should divide the big wall in many smaller quads to achieve a better effect??
©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
It's a limitation of per vertex based lighting. You either need to split the wall up into more pieces, or use per pixel based lighting.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Just FYI, in order to do pixel-based lighting, you would need to write a shader for it. I would definitely recommend splitting up the wall. How much depends on how fine you want the light to be. If you split it up too much, though, you'll just get too many and decrease performance.
akb825 Wrote:Just FYI, in order to do pixel-based lighting, you would need to write a shader for it.You can also use DOT3 operations on older cards for per-pixel lighting effects like normal mapping, although it doesn't offer anywhere near as much flexibility.
Or you could use static lightmaps and make the lighting as fancy as you want.
"Yes, well, that's the sort of blinkered, Philistine pig-ignorance I've come to expect from you non-creative garbage."
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Doing the wall slide thing | monteboyd | 9 | 6,380 |
Jul 8, 2003 05:13 PM Last Post: monteboyd |