Advertisement Jump to content


This topic is now archived and is closed to further replies.

Joshua Schpok

Minimize texture or matrix changes?

This topic is 6179 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

When rendering a scene, you want to minimize the number of texture switches, as they may have to be pulled from system memory. Hardware tackles transformation, which means you''ve got to set the transformation matrix on your card before you start throwing it geometry. With articulated skeletons and the like, you''ll probably be doing lots of matrix switching. I think you could reduce the amount of matrix switching by ordering your geometry by transformation. This could, however, ruin your "by texture" ordering. Example: A tentacle has a seperate top and bottom texture. Texture ordering would draw the top part of the tentacle, switching matrices at each joint, then flip to the bottom texture and draw the bottom geometry switching through each matrix again. t = total textures, j = total joints Texture switches: t-1 Matrix switches: j*t Ordering by transform would draw each joint at a time, switching to top then bottom textures each time. Texture switches: j*t Matrix switches: j-1 It seems you''d want to order via matrix when t is small and j is large. Any ideas? Oddball Studios

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!