Skip to content

Texture Atlas for more optimized instancing#293

Open
kirides wants to merge 42 commits into
masterfrom
feat/texture_atlas
Open

Texture Atlas for more optimized instancing#293
kirides wants to merge 42 commits into
masterfrom
feat/texture_atlas

Conversation

@kirides
Copy link
Copy Markdown
Owner

@kirides kirides commented Mar 15, 2026

  • implements a Texture atlas approach for World mesh and static VOBs

    • the world mesh is drawn with a single Multidraw dispatch, where the buffers are created once upon world loading
    • static VOBs work the same
  • On Top of Atlas support:

    • completely draw Mesh and vobs using Multidraw indirect with a single texture atlas binding per texture format.
    • build a Hi-Z buffer to perform occlusion culling for VOBs using the world mesh drawn in the previous step.
    • perform frustum and distance culling on the GPU using Compute shaders.
  • prepare some abstractions to ease migration to dx12 at some point in the future.

    • D3D11CommandList as a wrapper around the immediate context, not yet in use.
    • PipelineStateObject as abstraction for currently manually managed d3d11 raster states. Not yet in use, would increase PR way too much and requires a lot of refactoring. Current approach of SetDefaultStates and UpdateRenderStates is working fine, but doesn't map to dx12/Vulkan at all.
  • started to reduce the weight of D3D11GraphicsEngine by moving some parts of specific renderpasses into separate classes.

  • increase normalmap precision while keeping them 32bpp using octahedral encoding.

    • required HBAO+ to stop using normals as the library doesn't support encoded normals.

many more things, will update this PR description shortly.

@kirides kirides force-pushed the feat/texture_atlas branch from fecf40a to a47d53d Compare March 20, 2026 09:06
@kirides kirides changed the title Texture Atlas, reduce shader math Texture Atlas for more optimized instancing Mar 20, 2026
@kirides kirides force-pushed the feat/texture_atlas branch 2 times, most recently from 0774526 to 4ff50f7 Compare March 25, 2026 20:00
@kirides kirides force-pushed the feat/texture_atlas branch 2 times, most recently from 50432c5 to 80a4c70 Compare April 2, 2026 21:40
@kirides kirides force-pushed the feat/texture_atlas branch from 80a4c70 to b861b15 Compare April 7, 2026 12:25
@kirides kirides force-pushed the feat/texture_atlas branch from b861b15 to 0320d94 Compare April 18, 2026 19:23
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