Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Webgl texture atlas performance thoughts

4: Adsense

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   

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

#2 mhagain   Members   

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