Jump to content

  • Log In with Google      Sign In   
  • Create Account


Webgl texture atlas performance thoughts


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 resle   Members   -  Reputation: 129

Like
0Likes
Like

Posted 08 May 2012 - 03:27 AM

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..

Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 7466

Like
0Likes
Like

Posted 08 May 2012 - 08:43 AM

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.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS