Skip to content

SSBO Support#848

Draft
RuffledPlume wants to merge 34 commits into117HD:masterfrom
RuffledPlume:ZoneSSBO
Draft

SSBO Support#848
RuffledPlume wants to merge 34 commits into117HD:masterfrom
RuffledPlume:ZoneSSBO

Conversation

@RuffledPlume
Copy link
Contributor

No description provided.

 *Added GLBinding
   * Manages TextureUnits, ImageUnits & Buffer Binding Indexes
   * Increments counts and initialises values upon first use
   * Manages SSBO/TBO under the same Bindings
 * Refactored UniformBuffer into StructuredBuffer
   * UniformBuffer now derives from StructuredBuffer becoming UniformStructuredBuffer
   * Added ShaderStorageBuffer, uses SSBO if supported and fallsback to TextureBuffers if not
 * Shaders now use the max supported OpenGL Version
    * All Shader files use `VERSION_HEADER` define
    * Fixed compile errors when using 4.1+
    * Needed inorder to support SSBO, since `buffer` is a reserved keyword in older versions of the shader language
 * Added SliceAllocator which manages blocks of memory, with support for validating slices not overlapping & defragmenting
 * Added Useful debug stats (DrawCallCount, ZoneCount, Dynamic Renderables)
 * CheckGLErrors can now print useful context info
 * RenderState can now print its current state
 * Added SSBOModelData
   * Static Models grab slices for the zone during upload
   * Dynamic Models grab slices per frame and set data in `drawDynamic` & `drawTemp`
   * Flags are used to determine if model is a "detailModel" & should fade out untill completely culled
   * worldViewIndex is stored within the ModelData struct, removing the need to push metadata for the dynamic VAOs
 * Optimised TempModelData uploading
Removed Zone Metadata VBO, instead ZoneIDx is packed into the same Vertex Attrib as the Model IDx
ZoneIDx uses 12 bits allowing up to 4K Zones which matches the UBO Limit
ModelIdx uses 20 bits allowing up to 1M models which is probably overkill, we can balance as needed if we need to support more zones
 *Added GLBinding
   * Manages TextureUnits, ImageUnits & Buffer Binding Indexes
   * Increments counts and initialises values upon first use
   * Manages SSBO/TBO under the same Bindings
 * Refactored UniformBuffer into StructuredBuffer
   * UniformBuffer now derives from StructuredBuffer becoming UniformStructuredBuffer
   * Added ShaderStorageBuffer, uses SSBO if supported and fallsback to TextureBuffers if not
 * Shaders now use the max supported OpenGL Version
    * All Shader files use `VERSION_HEADER` define
    * Fixed compile errors when using 4.1+
    * Needed inorder to support SSBO, since `buffer` is a reserved keyword in older versions of the shader language
 * Added SliceAllocator which manages blocks of memory, with support for validating slices not overlapping & defragmenting
 * Added Useful debug stats (DrawCallCount, ZoneCount, Dynamic Renderables)
 * CheckGLErrors can now print useful context info
 * RenderState can now print its current state
 * Added SSBOModelData
   * Static Models grab slices for the zone during upload
   * Dynamic Models grab slices per frame and set data in `drawDynamic` & `drawTemp`
   * Flags are used to determine if model is a "detailModel" & should fade out untill completely culled
   * worldViewIndex is stored within the ModelData struct, removing the need to push metadata for the dynamic VAOs
 * Optimised TempModelData uploading
Removed Zone Metadata VBO, instead ZoneIDx is packed into the same Vertex Attrib as the Model IDx
ZoneIDx uses 12 bits allowing up to 4K Zones which matches the UBO Limit
ModelIdx uses 20 bits allowing up to 1M models which is probably overkill, we can balance as needed if we need to support more zones
Model Fade has to use dither since it writes depth
@RuffledPlume RuffledPlume marked this pull request as draft February 23, 2026 14:04
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