Agrarsense
GlobalGraphicsSettings.h
Go to the documentation of this file.
1// Copyright (c) 2023 FrostBit Software Lab at the Lapland University of Applied Sciences
2//
3// This work is licensed under the terms of the MIT license.
4// For a copy, see <https://opensource.org/licenses/MIT>.
5
6#pragma once
7
8#include "AntiAliasing.h"
9#include "QualityLevel.h"
10
11#include "SceneTypes.h"
12#include "GlobalGraphicsSettings.generated.h"
13
14USTRUCT(Blueprintable)
15struct AGRARSENSE_API FGlobalGraphicsSettings
16{
17 GENERATED_BODY()
18
19 /*
20 * Graphics preset. Default Ultra.
21 */
22 UPROPERTY(EditAnywhere, BlueprintReadWrite)
23 EQualityLevel QualityLevel = EQualityLevel::Balanced;
24
25 /*
26 * AntiAliasing method. Default TAA.
27 * This is linked with QualityLevel. Changing QualityLevel will change Antialiasing method back to TAA.
28 */
29 UPROPERTY(EditAnywhere, BlueprintReadWrite)
30 EAntiAliasing AntiAliasingMethod = EAntiAliasing::TAA;
31
32 /*
33 * Should Grass be rendered.
34 */
35 UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
36 bool RenderGrass = true;
37
38 /*
39 * Should disable Spectator camera 3D rendering.
40 * Disabling this improves performance with multiple camera sensors.
41 */
42 UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
43 bool DisableSpectatorRendering = false;
44
45 /*
46 * How far should World Position Offset be rendered in cm.
47 * World Position Offset handles foliage wind and other meshes snow.
48 * Only applies for meshes rendered by InstancedRenderer system.
49 * 0 = unlimited
50 */
51 UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
52 int32 WorldPositionOffsetDistance = 30000;
53
54 /*
55 * Nanite max pixels per edge multiplier. Default is 1.0 by the engine.
56 * Lower value means more detail but more performance heavy.
57 * Higher value means less detailed models but better performance.
58 */
59 UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
60 float NaniteMaxPixelsPerEdge = 1.0f;
61
62 /*
63 * Shadow cache invalidation behavior option.
64 * Meshes with World Position Offset (WPO) is very expensive for shadows to be recalculated,
65 * for that reason default option is Rigid, meaning mesh shadows do not move when WPO (wind for example) moves a mesh.
66 * Set this to Auto or Always if you want mesh shadows to move accurately.
67 * Only applies to meshes rendered with InstancedRenderer system.
68 * https://docs.unrealengine.com/5.3/en-US/PythonAPI/class/ShadowCacheInvalidationBehavior.html
69 */
70 UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
71 EShadowCacheInvalidationBehavior FoliageShadowCacheInvalidationBehaviour = EShadowCacheInvalidationBehavior::Rigid;
72
73 /*
74 * Enables the use of Virtual Shadow Maps (VSM), a technique that improves shadow quality and scalability
75 * in large, complex scenes by providing detailed shadows with better memory management.
76 * Disabled due high amount of flickering with foliage.
77 */
78 UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
79 bool UseVirtualShadowMaps = false;
80
81 /*
82 * Enables caching for Cascaded Shadow Maps (CSM) to improve performance by reusing shadow map data
83 * instead of recalculating it every frame.
84 */
85 UPROPERTY(EditAnywhere, BlueprintReadWrite, Transient)
86 bool ShadowCSMCaching = true;
87};
EAntiAliasing
Definition: AntiAliasing.h:15
EQualityLevel
Definition: QualityLevel.h:16