Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AZDO: Array textures / sparse textures (for HW that supports it) #45

Open
xycaleth opened this issue May 1, 2016 · 0 comments
Open

Comments

@xycaleth
Copy link
Owner

xycaleth commented May 1, 2016

To reduce driver overhead, we can eliminate texture binding calls. All textures are uploaded into slices of an array texture. Each array texture will essentially be a bucket for {texture format, size, samples}. Each GLSL shader will contain an array of array textures, e.g.: uniform sampler2DArray u_DiffuseTextures[30]; and the texture to use can be identified by passing uniform integers to dynamically select the texture.

For HW that supports it, this can be taken even further by using either sparse textures, where all texture virtual memory is preallocated ahead of time, and then backed with physical memory as/when necessary.

Bindless textures are also an option where the texture handles are passed directly to the shader through a uniform, rather than binding each individual texture.

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

No branches or pull requests

1 participant