RenderTexture format missing RGB

When creating a RenderTexture asset you can set the color format like with other textures, however It doesnt have any option for RGB, only has R, RG & RGBA (8, 16, 32, signed, unsigned etc) only time I can see just RGB is the packed formats.
Is this a bug or is it by design - if by design could someone explain why?

P.S. using unity 2021.1 beta

GPUs generally don’t support RGB render targets, apart from R5G6B5 and R11G11B10, which are on the list. GPUs like render targets that are aligned to powers of 2 byte sizes. Specifically 8, 16, 32, 64, or 128 bit (1, 2, 4, 8, or 16 bytes). And mismatched channel precision tends to be something of a last resort as it causes color shifting, hence why R5G5B6A1 and R10G10B10A2 both exist. R5G6B5 used to be popular in the past, a lot of early GPUs used that is the default render format back when rendering to a 16 bit color vs 24 bit color was the difference between playable framerates and a slide show. And R11G11B10 saw some use in early HDR rendering when there weren’t really any other options, and deferred rendering for the normal buffer. But today those are almost always using RGBA half or R10G10B10A2. The precision is uniform, at least for the RGB channels, and you get an extra channel to pack a little more data for free.

7 Likes

Great answer, thank you!

1 Like