Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uniform blocks in most shaders #51

Open
tatjam opened this issue Jan 30, 2023 · 0 comments
Open

Use uniform blocks in most shaders #51

tatjam opened this issue Jan 30, 2023 · 0 comments
Labels
code-improvement Improvements to the code base which don't change the game graphics

Comments

@tatjam
Copy link
Collaborator

tatjam commented Jan 30, 2023

Instead of setting all the transform matrices (which are quite a few in our "double" world) every frame, we can create a uniform block and set that instead.

This should offer a performance improvement (albeit possibly minor) as instead of (5 * object) uniform sets, we would have a single call at the start of the frame. Implementation details here: https://learnopengl.com/Advanced-OpenGL/Advanced-GLSL

@tatjam tatjam added code-improvement Improvements to the code base which don't change the game graphics labels Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-improvement Improvements to the code base which don't change the game graphics
Projects
None yet
Development

No branches or pull requests

1 participant