PageRenderTime 44ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. namespace 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. /// <summary>
  27. /// 32 bit color display bit depth. Usually only the RGB components are
  28. /// important so this color mode is usually called 24 bit because the
  29. /// last 8 bits are unused. Quality is a lot better than 16 bit, but
  30. /// since this is twice as many bits, it needs twice the memory bandwidth.
  31. /// Faster platforms have this as their default, which is even faster for
  32. /// them because memory bandwidth is not a big issue and converting to
  33. /// 16 bit can even slow you down. For slower and older mobile devices
  34. /// and especially devices that can only do 16 bit on the display anyway,
  35. /// it is much better to choose 16 bit. A developer can choose this bit
  36. /// depth if he wants more quality on devices where it makes a difference
  37. /// if he still has enough performance.
  38. /// </summary>
  39. RGBA8888,
  40. /// <summary>
  41. /// Special mode for 16-bit floating point RGBA frame buffers, 16 bit
  42. /// float is also called half-float. Total size is 64 bit. Screens usually
  43. /// only have 24 bits or even only 18 bits (3*6 bits), so this mode only
  44. /// makes sense for HDR cases and high performance platforms.
  45. /// </summary>
  46. RGBAFloat16,
  47. /// <summary>
  48. /// Special mode for 32-bit floating point RGBA frame buffers. Total size
  49. /// is 128 bit. Screens usually only have 24 bits or even only 18 bits
  50. /// (3*6 bits), so this mode only makes sense for HDR cases and high
  51. /// performance platforms.
  52. /// </summary>
  53. RGBAFloat32,
  54. }
  55. }