10#include "ConstructorHelpers.h"
11#include "Materials/MaterialInstanceDynamic.h"
12#include "Components/SceneCaptureComponent2D.h"
17 ConstructorHelpers::FObjectFinder<UMaterial> Loader(*Path);
18 if (Loader.Succeeded())
22 return Loader.Succeeded();
30 AddShader({UMaterialInstanceDynamic::Create(MaterialFound,
this), 1.0});
33 for (
const auto &Shader :
Shaders)
36 SceneCapture.PostProcessSettings.AddBlendable(Shader.PostProcessMaterial, Shader.Weight);
42 Shaders[ParameterValue.ShaderIndex].PostProcessMaterial->SetScalarParameterValue(
43 ParameterValue.ParameterName,
44 ParameterValue.Value);
50 Super::Set(Description);
56 const FName &ParameterName,
void Set(const FActorDescription &ActorDescription) override
TArray< UMaterial * > MaterialsFound
TArray< FSensorShader > Shaders
void AddShader(const FSensorShader &Shader)
Add a post-processing shader.
void SetUpSceneCaptureComponent(USceneCaptureComponent2D &SceneCapture) override
TArray< FShaderFloatParameterValue > FloatShaderParams
bool AddPostProcessingMaterial(const FString &Path)
Load the UMaterialInstanceDynamic at the given Path and append it to the list of shaders with Weight.
void SetFloatShaderParameter(uint8_t ShaderIndex, const FName &ParameterName, float Value)
static void SetCamera(const FActorDescription &Description, ASceneCaptureSensor *Camera)
A description of a Carla Actor with all its variation.