Skip to content

Only update PushBuffer if any uniform has actually changed #1685

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

VReaperV
Copy link
Contributor

Requires #1684

Further improvement for PushBuffer, only update it if it's actually required.

@VReaperV VReaperV added T-Improvement Improvement for an existing feature A-Renderer labels Jun 23, 2025
@VReaperV VReaperV force-pushed the push-buffer-update branch 2 times, most recently from bec3aa0 to ad58d5c Compare June 24, 2025 17:42
@VReaperV
Copy link
Contributor Author

Also added a fix for globalFog fog texture.

@VReaperV VReaperV force-pushed the push-buffer-update branch 2 times, most recently from f67e29b to e84d583 Compare June 25, 2025 05:55
@VReaperV
Copy link
Contributor Author

VReaperV commented Jun 25, 2025

Changed the initial commit and added a new one, now it mutualises currentValue and uniformFirewall (in a way that works with any kind of uniform unlike uniformFirewall, and with both buffers and shader programs unlike currentValue), GLUniform.WriteToBuffer() now only has 1 definition, and the uniform setting functions are now much simpler. Also NUKED a bunch of now unused code.

VReaperV added 16 commits June 28, 2025 16:20
This will be required for PushBuffer.
Will be required for PushBuffer. Also added back `_isTexture` to `GLUniform` because it will also be needed for PushBuffer.
Needed for `PushBuffer`.
…stem

Deleting the buffer automatically unmaps it.
Adds `PushBuffer` class, `pushBuffer` global, and the supporting code for `glconfig2`.
Also adds `GLShader.pushSkip` and `GLShader._pushUniforms`. Add `padding` back to the `GLShader` size calculations in material system.
Will be required for `PushBuffer` to set global uniform values outside of their shaders.
This will set `GLShaderManager.globalUniformBlock` to the struct + defines text, which will be the same for all shaders.
This will be required for `PushBuffer` to correctly sort uniforms. Also updates `GLShader.WriteUniformsToBuffer()` to use `mode` and `filter` arguments to select the correct uniforms.
Post-process shaders to actually add the `globalUniformBlock`, add `SetConstUniforms()` and `SetFrameUniforms()` functions to the core and material system renderers, and add the supporting glsl code.
Also mutualises `uniformFirewall` and `currentValue` and removes a bunch of unneeded code.
@VReaperV VReaperV force-pushed the push-buffer-update branch from 80717b6 to 8832f45 Compare June 30, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Renderer T-Improvement Improvement for an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant