Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3D Graphics Batching

A lot of sites/articles say 'batch! batch! batch!'. Can someone explain what 'batching' represents with respect to shaders?

Namely, does

  1. changing textures
  2. changing arbitrary shader variables

mean something can't be 'batched'?

like image 579
jameszhao00 Avatar asked Nov 11 '10 03:11

jameszhao00


1 Answers

The easiest way to summarize it is to try to make as few API calls as you can to draw what you need to draw. Using vertex arrays or VBOs (not even optional in modern APIs), texture atlases and avoiding the need for state changes all contribute to that. It's really amazing how many triangles a modern GPU can draw in the time it takes you to turn around and set up the next drawing call.

like image 193
Ben Jackson Avatar answered Oct 02 '22 00:10

Ben Jackson