23 {
25
27
28 {
30
31 const auto material = ResourcePool<Material>::Load<Material>("PostProcessRenderer.Bloom.Default");
32
34 }
35
36 {
38
39 const auto material = ResourcePool<Material>::Load<Material>("PostProcessRenderer.ToneMapping.Default");
40
42
43 material->GetConstantParams().for_each([&](const std::string& k, ConstantParams& v){
45
46 if (k == "exposure")
47 {
48 if (ImGuiH::DrawMaterialConstParams<float>(material, ImGuiDataType_Float, 1, "%.3f", v))
49 {
51 }
52 }
53 if (k == "toneMapper")
54 {
55 int selected = std::any_cast<int>(v.value.paramValue);
56
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)))
60 {
61 v.value.paramValue = selected;
62 material->UpdateMaterial();
64 }
65 ImGui::PopItemWidth();
66 }
67 });
68 return false;
69 });
70 });
71 }
72 }
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
static FrameInfo & Get()
Get FrameInfo.
std::shared_ptr< World > m_World
The shared pointer of specific world.
static ImVec2 GetLineItemSize()
Get Line Width's Square Size.
static void DrawMaterial(const std::string &name, float width, const std::shared_ptr< Material > &material)
Draw a Material.
static void DrawPropertyItem(const std::string &itemName, float columeWidth, std::function< void()> nameFunc, std::function< void()> valFunc)
Draw a single property.
static void DrawTreeTitle(const std::string &treeName, std::function< void()> optionFunc, std::function< void()> treeFunc)
Draw a stylized tree title bar.