BsRenderBeastOptions.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 "Renderer/BsRenderer.h"
  6. #include "Renderer/BsRenderQueue.h"
  7. namespace bs { namespace ct
  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 RenderBeastOptions : public RendererOptions
  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. * Controls if and how a render queue groups renderable objects by material in order to reduce number of state
  32. * changes. Sorting by material can reduce CPU usage but could increase overdraw.
  33. */
  34. StateReduction stateReductionMode = StateReduction::Distance;
  35. /**
  36. * Determines the maximum shadow map size, in pixels. The system might decide to use smaller resolution maps for
  37. * shadows far away, but will never increase the resolution past the provided value.
  38. */
  39. UINT32 shadowMapSize = 2048;
  40. /**
  41. * Determines the number of samples used for percentage closer shadow map filtering. Higher values yield higher
  42. * quality shadows. Valid range is [1, 4].
  43. */
  44. UINT32 shadowFilteringQuality = 4;
  45. };
  46. /** @} */
  47. }}