Skip to content
elemel edited this page Mar 9, 2012 · 1 revision

The graphics is rendered in multiple passes:

  1. A depth pass that acts as a prepass for the AO pass. It may or may not be possible to combine this with the AO pass. Depth (Z) matters. Only draw to the depth buffer where the sprites are opaque.
  2. An AO pass that accumulates soft shadow sprites using GL_MAX. Enable the depth test but do not write to the depth buffer. Draw all shadow sprites. Might need to use a Z offset to avoid self-shadowing.
  3. A color pass that renders all sprites back to front. May be able to write the depth here, i.e. combine with pass 1.
Clone this wiki locally