Skip to content

Add voxel texture atlas to reduce draw calls #341

Description

@afritz1

It would be nice to combine voxel textures at runtime to reduce bind material calls during rendering. This would help the most in cities because they are CPU bound even with Vulkan.

Arena organizes its voxel textures in .SET files which are 3-4 textures for each building, but the modern way should be one big texture sub-allocated within.

Probably add a RenderTextureAtlas which manages the contents of an ObjectTextureID. It maintains a 2D heap and maybe pairs a TextureAsset with a 2D span. RenderVoxelChunkManager's batching probably needs revision, it needs a RenderTextureAtlasEntryID comparison with adjacent faces instead of an ObjectTextureID comparison. Fragment shaders probably need UV coordinates revised too so they're not all 0 to 1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions