BsRenderBeastOptions.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. * All colors output from shaders will be automatically converted to gamma space when written to render target(s).
  37. * Normally used when the renderer performs calculations in linear space.
  38. */
  39. bool gammaCorrect = true;
  40. /**
  41. * High dynamic range allows light intensity to be more correctly recorded when rendering by allowing for a larger
  42. * range of values. The stored light is then converted into visible colors using a tone mapping operator depending
  43. * on average scene brightness.
  44. */
  45. bool hdr = false;
  46. /**
  47. * Controls if and how a render queue groups renderable objects by material in order to reduce number of state
  48. * changes. Sorting by material can reduce CPU usage but could increase overdraw.
  49. */
  50. StateReduction stateReductionMode = StateReduction::Distance;
  51. };
  52. /** @} */
  53. }