Jump to content
  • Advertisement
Sign in to follow this  
Ainokea

OpenGL Opengl lights limited to 8

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

The red book says that OpenGL is limited to 8 lights at one time and I was wondering what methods are there to imitate lighting and make it look like there are more then 8 lights in a scene.

Share this post


Link to post
Share on other sites
Advertisement
light mapping for static lights

The restriction of 8 lights is 8 lights per vertex, just change how the light is defined when you need it. However, above 3lights per vertex satutation can quickly accure in the frame buffer.

Share this post


Link to post
Share on other sites
Do your own lighting, if you can afford it. Just emulate the OpenGL lighting equation for each vertex. It's costly but you can improve it with dirty aras / volumes, etc.

Share this post


Link to post
Share on other sites
Quote:
Original post by _the_phantom_
light mapping for static lights

The restriction of 8 lights is 8 lights per vertex, just change how the light is defined when you need it. However, above 3lights per vertex satutation can quickly accure in the frame buffer.

Oh well thats good news. Thanks!

Share this post


Link to post
Share on other sites
It's still a pain in the ass to work with the 8 lights limitation. Besides, if you want to use vertex arrays and such, you can't really change the light in the middle of the vertex, you would have to do it per object. Similarly, I don't see how you can do your own lighting if you need dynamic lights and vertex arrays.

Share this post


Link to post
Share on other sites
I don't see how it's a huge problem, any consumer hardware that would be able to perform vaguely well at 8 lights, would support vertex programs anyway, and you could do as many as you like then ( within reason ), or just go one better and do PPL.

Share this post


Link to post
Share on other sites
If you know how you want to change the light each time around, just use display lists in conjunction with your vertex buffers. IE, organize your vertex buffer to display the vertices that share common lights first, then change the lighting scheme and render some more, then render it again etc. You can still use vertex buffers it's just that you change the lighting and then run more indices.

what's the big deal?

Share this post


Link to post
Share on other sites
do games really use the lighting functions in the OpenGL API? I thought they made their own really (lightmaps, per-pixel lighting, etc.)...

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!