• Advertisement
Sign in to follow this  

shaders and uniforms

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

Noobish shader question I'm afraid, but I've not seen anything explicit as to the correct way of doing things. Should I be: a) creating one instance of a shader for each object that uses the shader type, and leaving the uniforms set for that shader? b) creating one instance of a shader for all objects that use the shader type, and setting all the uniforms (or at least the ones that change) every time I render an object? c) something else?

Share this post


Link to post
Share on other sites
Advertisement
a) no
b) yes
c) for better performance group uniforms that change together (per-frame, per-object, per-world) and use bindable uniform buffer extension (in GL3 it is in core).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement