Skip to main content
GameDev.net gamedev.net
🔒 Locked

Webgl texture atlas performance thoughts

Started by resle May 8, 2012 at 9:27 AM 0 replies 1.5k views
Original Post
resle
resle
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.
..so we ate rare animals, we spent the night eating rare animals..
21st Century Moose
21st Century Moose
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.
Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls. 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.