Jump to content
  • Advertisement
Sign in to follow this  
Niall18

OpenGL Another per pixel lighting question

This topic is 5128 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've read a lot of the previous posts and just wanted a bit of clarity on my own question. OpenGL doesn't allow for any more than 8 lights in its scene at one time but i need well in excess of 8 lights and i'm going to want to be able to change the position of those lights so they need to be dynamic. Is the only option open to me per pixel lighting or are there others? I read the article: Real-Time Per-Pixel Point Lights and Spot Lights in OpenGL using nVidia Register Combiners by Ronald Frazier And this seems to suggest per pixel lighting can only be done on nVidia cards? Is this the case and does any body else know of any other papers/tutorials to help me out. Cheers for any help.

Share this post


Link to post
Share on other sites
Advertisement
that is 8lights per vertex per pass (u can have 1000's of lights in a scene with standard gl lighting)

>>And this seems to suggest per pixel lighting can only be done on nVidia cards? Is this the case and does any body else know of any other papers/tutorials to help me out.<<

no, check out delphi3d.net, humus (google both with opengl) etc

Share this post


Link to post
Share on other sites
you could, in theory, have infinite lights if you made multiple passes, and also, with pixel shaders, you could interpret the state data differently and use every 4 vectors as a light (position, diffuse, ambient specular) which, with i think its 96 registers available, gives a few more than 8 lights, there are lots of possibilities

hope that helps
-Dan

Share this post


Link to post
Share on other sites
Thanks a lot both of you, i've found a few good articles and demos which follow what your saying so i'll spend a bit of time working through these, thanks.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!