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

Allocates More Texture Memory than Required for Samplers #501

Open
blgrossMS opened this issue Oct 4, 2019 · 0 comments
Open

Allocates More Texture Memory than Required for Samplers #501

blgrossMS opened this issue Oct 4, 2019 · 0 comments
Assignees

Comments

@blgrossMS
Copy link

Wanted to highlight and issue in texture sampler creation. The hierarchy of glTF is Material -> Textures -> (Sampler, Image)

Currently UnityGLTF creates Texture2D at the image creation level which necessitates a CPU copy of the texture in order to create different samples at the texture layer.

This can be improved by making it so that ConstructImage simply creates a CPU buffer (byte array or memorystream) and then ConstructTexture simply uses that to instantiate textures. This will make it so that the Texture2D can by default be marked as GPU only, reducing resulting memory footprint by 1/2 (though peak will be having an additional CPU copy still.

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

No branches or pull requests

2 participants