2
3
4
5
9#include "World/World/World.h"
14 const std::string& panelName ,
26 const float columeWidth = ImGuiH::GetLineItemSize().x * 10.0f;
31 const auto material = ResourcePool<Material>::Load<Material>(
"PostProcessRenderer.Bloom.Default");
33 ImGuiH::DrawMaterial(
"Bloom", columeWidth, material);
39 const auto material = ResourcePool<Material>::Load<Material>(
"PostProcessRenderer.ToneMapping.Default");
43 material->GetConstantParams().for_each([&](
const std::string& k, ConstantParams& v){
44 ImGuiH::DrawPropertyItem(k, columeWidth,
nullptr, [&](){
48 if (ImGuiH::DrawMaterialConstParams<
float>(material, ImGuiDataType_Float, 1,
"%.3f", v))
50 FrameInfo::Get().m_World->Mark(World::NeedUpdateTLAS | World::FrushStableFrame);
53 if (k ==
"toneMapper")
55 int selected = std::any_cast<
int>(v.value.paramValue);
57 static const char* toneMappers[] = {
"AMD Tonemapper",
"DX11DSK",
"Reinhard",
"Uncharted2Tonemap",
"ACES",
"No tonemapper" };
58 ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
59 if (ImGui::Combo(
"##", &selected, toneMappers, _countof(toneMappers)))
61 v.value.paramValue = selected;
62 material->UpdateMaterial();
63 FrameInfo::Get().m_World->Mark(World::NeedUpdateTLAS | World::FrushStableFrame);
65 ImGui::PopItemWidth();
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
FrameInfo Class. This class defines the FrameInfo data.
static void DrawTreeTitle(const std::string &treeName, std::function< void()> optionFunc, std::function< void()> treeFunc)
Draw a stylized tree title bar.
The ImGuiH Class. This class defines helper function for slate render.
virtual void OnRender() override
This interface is called On SlateRenderer Render.
ImguiPostProcessing(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function.
The ImguiPostProcessing Class. This class defines how to render a PostProcessing options.
ImguiSlate(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function. Init with Slate's name.
This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit fro...