Jump to content
  • Advertisement
Sign in to follow this  
reenam

OpenGL lighting techniques in openGl

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

We want to implement light on our game...our game is like warcraft...how could we get started....how could we effective include light in our game...please help us to get started.

Share this post


Link to post
Share on other sites
Advertisement
The easiest way is to take advantage of the builtin fixed function pipeline, that is with methods such as glEnable(GL_LIGHTING), glLightfv() and the rest. As the maximum amount of lights is usually 8 at once, one good way for moving objects is to calculate the nearest lights and for static world to divide it into cells. If you go into vertex lighting you might get better results.

Other techniques are lightmapping and per-pixel lighting, with the last mostly done with fragment shaders.

It all boils down to whether or not you want to start implementing shaders or use the fixed function, which I think in GL3.xxx is considered deprecated.

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!