Jump to content
  • Advertisement
Sign in to follow this  
troxtril

using custom uniforms instead of build-ins

This topic is 3320 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 want to create a fully custom library including my own fog and light classes but most of the shader examples use the build-in uniforms such as gl_LightSource or gl_Fog. and these uniforms are also limited with GL_MaxLights and etc. is there a drawback using your own custom uniforms instead of these build-ins?

Share this post


Link to post
Share on other sites
Advertisement
Using custom uniforms is preferred way. OpenGL 3.0 has deprecated all built-in uniforms. In v3.0 forward compatible context does not allow to use any built-in uniform/attribute at all.

Share this post


Link to post
Share on other sites
OpenGL ES 2.0 also has no built-in uniforms.

Using custom uniforms is the preferred way.

Share this post


Link to post
Share on other sites
the only benifit of built in uniforms is they exist over multiple shaders

I wouldnt recommend using them, I do (+ I suspect the examples do as well ) cause we're lazy

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!