Skip to content

Uniform buffer#3335

Merged
IntegratedQuantum merged 5 commits into
PixelGuys:masterfrom
IntegratedQuantum:uniform_buffers
Jul 18, 2026
Merged

Uniform buffer#3335
IntegratedQuantum merged 5 commits into
PixelGuys:masterfrom
IntegratedQuantum:uniform_buffers

Conversation

@IntegratedQuantum

@IntegratedQuantum IntegratedQuantum commented Jul 6, 2026

Copy link
Copy Markdown
Member

The ultimate goal here is to have one global UBO that basically contains all the stuff you may need in most shaders, this PR aims to start with player position and matrices.

progress towards #102 (this is important for Vulkan, since we cannot store everything in push constants)

  • Should I use a #include for this?
  • What Pipeline changes are needed for Vulkan to recognize the bindings? Currently blocked since shaders don't compile for unrelated reasons

@IntegratedQuantum IntegratedQuantum changed the title Uniform buffers Uniform buffer Jul 6, 2026
This was referenced Jul 16, 2026
IntegratedQuantum added a commit that referenced this pull request Jul 17, 2026
This is done in our code since OpenGL's driver support is rather
lacking.
Also I found the required extension naming `#extension
GL_ARB_shading_language_include : require` rather annoying which comes
which comes with other parsers, so I omitted it here. Furthermore my
VSCode extension for glsl does not properly support includes whether
they have it or not.

Here I implemented includes for chunk data as an example.

fixes #105
required for #3335
@IntegratedQuantum

Copy link
Copy Markdown
Member Author

@codemob-dev as a heads-up for #3133: This changes how the matrices and positions are passed to the shader, it now uses a uniform buffer that's constant for the entire frame.
To change it in the middle of the frame you can use a graphics.frame_uniforms.StaticUbo

@IntegratedQuantum
IntegratedQuantum merged commit 22bc066 into PixelGuys:master Jul 18, 2026
1 check passed
@IntegratedQuantum
IntegratedQuantum deleted the uniform_buffers branch July 18, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant