-For each color attachment sampler, there is actually two buffers, the "main" and "alt" buffers. [`gbuffers`](/current/reference/programs/gbuffers/) and [`shadow`](/current/reference/programs/shadow/) programs read from the "main" buffer and write to the "main" buffer, which means that reading to and writing from the same buffer will cause artifacting. [`begin`](/current/reference/programs/begin/), [`shadowcomp`](/current/reference/programs/shadow_comp/), [`prepare`](/current/reference/programs/prepare/), [`deferred`](/current/reference/programs/deferred/), and [`composite`](/current/reference/programs/composite/) passes however read from the "main" buffer and write to the "alt" buffer, allowing them to read and write to the same buffer, and after that program the "main" and "alt" buffers are swapped so data written by the current program is read by the next program.
0 commit comments