BsRenderBeastOptions.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. /** Type of filtering to use for all textures on scene elements. */
  23. RenderBeastFiltering filtering = RenderBeastFiltering::Anisotropic;
  24. /**
  25. * Maximum number of samples to be used when performing anisotropic filtering. Only relevant if #filtering is set to
  26. * RenderBeastFiltering::Anisotropic.
  27. */
  28. UINT32 anisotropyMax = 16;
  29. /**
  30. * Number of samples per pixel. More samples means less aliasing but this may seriously increase fillrate and memory
  31. * consumption on the GPU.
  32. */
  33. UINT32 msaa = 1;
  34. /**
  35. * All colors output from shaders will be automatically converted to gamma space when written to render target(s).
  36. * Normally used when the renderer performs calculations in linear space.
  37. */
  38. bool gammaCorrect = true;
  39. /**
  40. * High dynamic range allows light intensity to be more correctly recorded when rendering by allowing for a larger
  41. * range of values. The stored light is then converted into visible colors using a tone mapping operator depending
  42. * on average scene brightness.
  43. */
  44. bool hdr = false;
  45. /**
  46. * Controls if and how a render queue groups renderable objects by material in order to reduce number of state
  47. * changes. Sorting by material can reduce CPU usage but could increase overdraw.
  48. */
  49. StateReduction stateReductionMode = StateReduction::Distance;
  50. };
  51. /** @} */
  52. }