Skip to content

Commit 2f5df2e

Browse files
committed
compute shaders don't flip
1 parent 4098f55 commit 2f5df2e

File tree

1 file changed

+5
-1
lines changed
  • src/content/docs/current/Reference/Shaders.Properties

1 file changed

+5
-1
lines changed

src/content/docs/current/Reference/Shaders.Properties/rendering.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,14 @@ Replace:
6969
```properties
7070
flip.<program>.<bufferName>=<true|false>
7171
```
72-
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.
72+
For each color attachment sampler, there are 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.
7373

7474
This behavior can be controlled with the `flip.<program>.<bufferName>` directive. Replace `<program>` with the program name (i.e. `composite2`), `<bufferName>` with the sampler name (i.e. `colortex5`), setting the value to `false` will disable the buffer flip that would happen after the end of that program. The default behavior is for buffer flipping to be enabled for all programs.
7575

76+
:::caution[Warning]
77+
Flips will not occur after passes which *do not have a fragment shader*. A pass which only has a compute shader will not trigger a flip.
78+
:::
79+
7680
----------------
7781

7882

0 commit comments

Comments
 (0)