Depth / stencil formats

All depth and stencil pixel formats are only usable in Canvases. They are non-readable by default, and Canvases with a depth/stencil format created with the readable flag can only access the depth values of their pixels in shaders (stencil values are not readable no matter what).

Constants

Name

Bits per pixel

Has depth

Has stencil

Note(s)

stencil8

8

Yes

depth16

16

Yes

depth24

24

Yes

depth32f

32

Yes

depth24stencil8

32

Yes

Yes

depth32fstencil8

40

Yes

Yes

Compressed formats

All compressed pixel formats are only usable in Images via CompressedImageData (compressed textures). Unlike regular color formats, these stay compressed in RAM and VRAM. This is good for saving memory space as well as improving performance, since the graphics card will be able to keep more of the image's pixels in its fast-access cache when drawing it.