BsRenderBeastOptions.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #pragma once
  2. #include "BsRenderBeastPrerequisites.h"
  3. #include "BsRenderer.h"
  4. #include "BsRenderQueue.h"
  5. namespace BansheeEngine
  6. {
  7. /**
  8. * @brief Texture filtering options for RenderBeast.
  9. */
  10. enum class RenderBeastFiltering
  11. {
  12. Bilinear, /**< Sample linearly in X and Y directions within a texture mip level. */
  13. Trilinear, /**< Sample bilinearly and also between texture mip levels to hide the mip transitions. */
  14. Anisotropic /**< High quality dynamic filtering that improves quality of angled surfaces */
  15. };
  16. /**
  17. * @brief A set of options used for controlling the
  18. * rendering of the RenderBeast renderer.
  19. */
  20. struct BS_BSRND_EXPORT RenderBeastOptions : public CoreRendererOptions
  21. {
  22. /**
  23. * @brief Type of filtering to use for all textures on scene elements.
  24. */
  25. RenderBeastFiltering filtering = RenderBeastFiltering::Anisotropic;
  26. /**
  27. * @brief Maximum number of samples to be used when performing anisotropic
  28. * filtering. Only relevant if ::filter is set to RenderBeastFiltering::Anisotropic.
  29. */
  30. UINT32 anisotropyMax = 16;
  31. /**
  32. * @brief Number of samples per pixel. More samples means less aliasing but this may
  33. * seriously increase fillrate and memory consumption on the GPU.
  34. */
  35. UINT32 msaa = 4;
  36. /**
  37. * All colors output from shaders will be automatically converted to gamma
  38. * space when written to render target(s). Normally used when the renderer
  39. * performs calculations in linear space.
  40. */
  41. bool gammaCorrect = true;
  42. /**
  43. * High dynamic range allows light intensity to be more correctly recorded
  44. * when rendering by allowing for a larger range of values. The stored light
  45. * is then converted into visible colors using a tone mapping operator depending
  46. * on average scene brightness.
  47. */
  48. bool hdr = true;
  49. /**
  50. * Controls if and how a render queue groups renderable objects by material in
  51. * order to reduce number of state changes. Sorting by material can reduce CPU usage
  52. * but could increase overdraw.
  53. */
  54. StateReduction stateReductionMode = StateReduction::Distance;
  55. };
  56. }