Skip to content

Commit f2e7ce5

Browse files
authored
Update colortex.mdx
1 parent 2f307e7 commit f2e7ce5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/content/docs/current/Reference/Buffers/colortex.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import { Badge } from '@astrojs/starlight/components';
1313

1414
There are 16 color attachments available through the `colortex0` through `colortex15` samplers. These samplers can be read from any program, and can be written to from the fragment stage of any [`begin`](/current/reference/programs/begin), [`prepare`](/current/reference/programs/prepare), [`gbuffers`](/current/reference/programs/gbuffers), [`deferred`](/current/reference/programs/deferred), or [`composite`](/current/reference/programs/composite) program.
1515

16+
:::caution[Warning]
17+
`colortex`es `0`-`3` cannot be read from in gbuffers programs. Sampling these buffers in these programs will sample the atlas instead.
18+
:::
19+
1620
#### Writing
1721
Any [`begin`](/current/reference/programs/begin), [`prepare`](/current/reference/programs/prepare), [`gbuffers`](/current/reference/programs/gbuffers), [`deferred`](/current/reference/programs/deferred), or [`composite`](/current/reference/programs/composite) program can write to a colortex buffer, the buffers to write to can be selected with the [`RENDERTARGETS`](/current/reference/constants/rendertargets) or [`DRAWBUFFERS`](/current/reference/constants/drawbuffers) directive.
1822

@@ -52,4 +56,4 @@ The first 8 colortex buffers have legacy aliases, although their names are often
5256

5357
:::note
5458
If `gdepth` is defined anywhere in the shader and the texture format for `colortex1`/`gdepth` is `RGBA` (or not specifically set by the shader), Iris will upgrade the format to `RGBA32F`. This represents legacy behavior, where `gdepth` was used to store depth values.
55-
:::
59+
:::

0 commit comments

Comments
 (0)