BsRenderBeastOptions.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. /** @addtogroup RenderBeast
  10. * @{
  11. */
  12. /** Texture filtering options for RenderBeast. */
  13. enum class RenderBeastFiltering
  14. {
  15. Bilinear, /**< Sample linearly in X and Y directions within a texture mip level. */
  16. Trilinear, /**< Sample bilinearly and also between texture mip levels to hide the mip transitions. */
  17. Anisotropic /**< High quality dynamic filtering that improves quality of angled surfaces */
  18. };
  19. /** A set of options used for controlling the rendering of the RenderBeast renderer. */
  20. struct BS_BSRND_EXPORT RenderBeastOptions : public CoreRendererOptions
  21. {
  22. RenderBeastOptions() { }
  23. /** Type of filtering to use for all textures on scene elements. */
  24. RenderBeastFiltering filtering = RenderBeastFiltering::Anisotropic;
  25. /**
  26. * Maximum number of samples to be used when performing anisotropic filtering. Only relevant if #filtering is set to
  27. * RenderBeastFiltering::Anisotropic.
  28. */
  29. UINT32 anisotropyMax = 16;
  30. /**
  31. * Number of samples per pixel. More samples means less aliasing but this may seriously increase fillrate and memory
  32. * consumption on the GPU.
  33. */
  34. UINT32 msaa = 1;
  35. /**
  36. * High dynamic range allows light intensity to be more correctly recorded when rendering by allowing for a larger
  37. * range of values. The stored light is then converted into visible colors using a tone mapping operator depending
  38. * on average scene brightness.
  39. */
  40. bool hdr = true;
  41. /**
  42. * Controls if and how a render queue groups renderable objects by material in order to reduce number of state
  43. * changes. Sorting by material can reduce CPU usage but could increase overdraw.
  44. */
  45. StateReduction stateReductionMode = StateReduction::Distance;
  46. };
  47. /** @} */
  48. }