Sign in to follow this  

Webgl texture atlas performance thoughts

This topic is 2047 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, given that the current webgl specification doesn't support texture arrays, I am implementing some sort of variable texture atlas mechanism in my last engine.

Essentially I pass to the shaders a couple variable multipliers for the texture coords to allow for arbitrary atlases to be used with any mesh.

My main concern is: won't multiplying every texture coord counter the performance gain given by using only a few large textures instead of switching many little ones?

Any thoughts or personal experiences for this scenario?

Thanks,
a.

Share this post


Link to post
Share on other sites
Profile and find out. My hunch is that you'll find that the gain from less texture changes (and consequent ability to do larger draw call batches) will far outweigh the cost of doing an extra per-vertex multiplication in your shaders.

Share this post


Link to post
Share on other sites

This topic is 2047 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this