| 1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
| 2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
| 3 | #pragma once |
| 4 | |
| 5 | #include "BsRenderBeastPrerequisites.h" |
| 6 | #include "Renderer/BsRenderer.h" |
| 7 | #include "Renderer/BsRenderQueue.h" |
| 8 | |
| 9 | namespace bs { namespace ct |
| 10 | { |
| 11 | /** @addtogroup RenderBeast |
| 12 | * @{ |
| 13 | */ |
| 14 | |
| 15 | /** Texture filtering options for RenderBeast. */ |
| 16 | enum class RenderBeastFiltering |
| 17 | { |
| 18 | Bilinear, /**< Sample linearly in X and Y directions within a texture mip level. */ |
| 19 | Trilinear, /**< Sample bilinearly and also between texture mip levels to hide the mip transitions. */ |
| 20 | Anisotropic /**< High quality dynamic filtering that improves quality of angled surfaces */ |
| 21 | }; |
| 22 | |
| 23 | /** A set of options used for controlling the rendering of the RenderBeast renderer. */ |
| 24 | struct RenderBeastOptions : public RendererOptions |
| 25 | { |
| 26 | /** Type of filtering to use for all textures on scene elements. */ |
| 27 | RenderBeastFiltering filtering = RenderBeastFiltering::Anisotropic; |
| 28 | |
| 29 | /** |
| 30 | * Maximum number of samples to be used when performing anisotropic filtering. Only relevant if #filtering is set to |
| 31 | * RenderBeastFiltering::Anisotropic. |
| 32 | */ |
| 33 | UINT32 anisotropyMax = 16; |
| 34 | |
| 35 | /** |
| 36 | * Controls if and how a render queue groups renderable objects by material in order to reduce number of state |
| 37 | * changes. Sorting by material can reduce CPU usage but could increase overdraw. |
| 38 | */ |
| 39 | StateReduction stateReductionMode = StateReduction::Distance; |
| 40 | |
| 41 | /** |
| 42 | * Determines the maximum shadow map size, in pixels. The system might decide to use smaller resolution maps for |
| 43 | * shadows far away, but will never increase the resolution past the provided value. |
| 44 | */ |
| 45 | UINT32 shadowMapSize = 2048; |
| 46 | }; |
| 47 | |
| 48 | /** @} */ |
| 49 | }} |