You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uniform Buffer Objects let you specify a bunch of uniforms from a buffer. The advantages are:
You can manipulate all the uniforms in the buffer outside of WebGL / WebGPU
You can have different sets of uniform buffer objects.
Assign whole buffer with many uniforms with a single WebGL call
Also, WebGPU allows uniforms to only be set using uniform buffers.
Basic design:
UniformBufferFormat - describes the content of the buffer (similar to VertexFormat) - list of uniforms and their types and so on.
UniformBuffer - an actual buffer, storing uniforms in a format described by UniformBufferFormat
WebGPU specifically has API that connects multiple uniform buffers as well as other buffer objects (textures) into a binding, and all of those can be set on a device (assigned to a bind slot) by a single call. The engine will support this as a way of setting up textures and uniform buffers as well. Design:
BindGroupFormat - describes the format as an array of uniform buffers / textures.
BindGroup - an actual instance of the BindGroupFormat, attaching actual uniform buffers and textures into the bind group. This can then be set on device using a single call.
In general, the engine will use 3 sets of BindGroups:
view - uniform buffers / textures that are constant per layer rendering using a camera.
material - uniform buffers / textures that are constant per material
mesh - uniform buffers / textures that change per mesh (all that is not included in the previous two groups)
The text was updated successfully, but these errors were encountered:
Not yet I think. We have Uniform Buffers, but their integration is limited to Scene and Mesh Uniform Buffers, and we still need to implement Material Uniform buffers.
Additionally, this is only WebGPU implementation, and we need WebGL2 implementation using Uniform Buffer Objects.
We could spin up separate tickets for this, but at the moment this covers all this work.
Uniform Buffer Objects let you specify a bunch of uniforms from a buffer. The advantages are:
Also, WebGPU allows uniforms to only be set using uniform buffers.
Basic design:
UniformBufferFormat - describes the content of the buffer (similar to VertexFormat) - list of uniforms and their types and so on.
UniformBuffer - an actual buffer, storing uniforms in a format described by UniformBufferFormat
WebGPU specifically has API that connects multiple uniform buffers as well as other buffer objects (textures) into a binding, and all of those can be set on a device (assigned to a bind slot) by a single call. The engine will support this as a way of setting up textures and uniform buffers as well. Design:
BindGroupFormat - describes the format as an array of uniform buffers / textures.
BindGroup - an actual instance of the BindGroupFormat, attaching actual uniform buffers and textures into the bind group. This can then be set on device using a single call.
In general, the engine will use 3 sets of BindGroups:
The text was updated successfully, but these errors were encountered: