BsRenderBeastOptions.h 2.4 KB

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