PageRenderTime 82ms CodeModel.GetById 41ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/Utilities/Graphics/ColorBufferMode.cs

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