/Utilities/Graphics/ColorBufferMode.cs
C# | 58 lines | 10 code | 3 blank | 45 comment | 0 complexity | 337514f2475b12ae5a441d0556f7c3cd MD5 | raw file
Possible License(s): Apache-2.0
- namespace Delta.Utilities.Graphics
- {
- /// <summary>
- /// Platform color buffer for a device. Usually RGB565 for mobile devices
- /// and RGBA8888 for PCs and Consoles. RGBAFloat16 or RGBAFloat32 can also
- /// be used for high profile PC or Console games.
- /// <para />
- /// Note: Exotic modes like RGBA4444, RGBA5551, RGB888, or RGB10A2 are not
- /// supported right now.
- /// </summary>
- public enum ColorBufferMode
- {
- /// <summary>
- /// 16 bit color display bit depth. This means less colors can be displayed
- /// and more jaggy steps between darker and brighter shaders of the same
- /// color are visible. Clever artists can circumvent that by using not
- /// so many shades, using dither effects or have a overall more comic or
- /// solid color look. This is the default color depth for most mobile
- /// only support 16 bit colors at the display anyway. For example check
- /// So using 24 or 32 bit for your frame buffer will not result in any
- /// better output, just worse performance. Red channel = 5 bits, Green
- /// channel = 6 bits and Blue channel = 5 bits. Some texture generation
- /// quality to fit the output format.
- /// </summary>
- RGB565,
-
- /// <summary>
- /// 32 bit color display bit depth. Usually only the RGB components are
- /// important so this color mode is usually called 24 bit because the
- /// last 8 bits are unused. Quality is a lot better than 16 bit, but
- /// since this is twice as many bits, it needs twice the memory bandwidth.
- /// Faster platforms have this as their default, which is even faster for
- /// them because memory bandwidth is not a big issue and converting to
- /// 16 bit can even slow you down. For slower and older mobile devices
- /// and especially devices that can only do 16 bit on the display anyway,
- /// it is much better to choose 16 bit. A developer can choose this bit
- /// depth if he wants more quality on devices where it makes a difference
- /// if he still has enough performance.
- /// </summary>
- RGBA8888,
-
- /// <summary>
- /// Special mode for 16-bit floating point RGBA frame buffers, 16 bit
- /// float is also called half-float. Total size is 64 bit. Screens usually
- /// only have 24 bits or even only 18 bits (3*6 bits), so this mode only
- /// makes sense for HDR cases and high performance platforms.
- /// </summary>
- RGBAFloat16,
-
- /// <summary>
- /// Special mode for 32-bit floating point RGBA frame buffers. Total size
- /// is 128 bit. Screens usually only have 24 bits or even only 18 bits
- /// (3*6 bits), so this mode only makes sense for HDR cases and high
- /// performance platforms.
- /// </summary>
- RGBAFloat32,
- }
- }