2
3
4
5
10#include "Render/Vulkan/VulkanRenderBackend.h"
15 const std::string& panelName ,
32
33
34 Begin(m_PanelName.c_str());
36 ImVec2 size = { m_Width , m_Height };
39
40
44 ImGui::Text(
"SceneColor");
45 ImGui::Image(m_GBufferID.SceneColorID, size);
50
51
55 ImGui::Text(
"Albedo");
56 ImGui::Image(m_GBufferID.AlbedoID, size);
61
62
66 ImGui::Text(
"Normal");
67 ImGui::Image(m_GBufferID.NormalID, size);
72
73
77 ImGui::Text(
"Roughness");
78 ImGui::Image(m_GBufferID.RoughnessID, size);
83
84
88 ImGui::Text(
"Metallic");
89 ImGui::Image(m_GBufferID.MetallicID, size);
94
95
99 ImGui::Text(
"Position");
100 ImGui::Image(m_GBufferID.PositionID, size);
105
106
116
117
121
122
131
132
139
140
144
145
153 const VkDescriptorImageInfo* sceneColorInfo = VulkanRenderBackend::GetRendererResourcePool()->AccessResource({
"SceneColor" });
154 const VkDescriptorImageInfo* albedoInfo = VulkanRenderBackend::GetRendererResourcePool()->AccessResource({
"Albedo" });
155 const VkDescriptorImageInfo* normalInfo = VulkanRenderBackend::GetRendererResourcePool()->AccessResource({
"Normal" });
156 const VkDescriptorImageInfo* roughnessInfo = VulkanRenderBackend::GetRendererResourcePool()->AccessResource({
"Roughness" });
157 const VkDescriptorImageInfo* metallicInfo = VulkanRenderBackend::GetRendererResourcePool()->AccessResource({
"Metallic" });
158 const VkDescriptorImageInfo* positionInfo = VulkanRenderBackend::GetRendererResourcePool()->AccessResource({
"Position" });
160 m_GBufferID.SceneColorID =
reinterpret_cast<ImTextureID>(ImGui_ImplVulkan_AddTexture(sceneColorInfo->sampler , sceneColorInfo->imageView , sceneColorInfo->imageLayout ));
161 m_GBufferID.AlbedoID =
reinterpret_cast<ImTextureID>(ImGui_ImplVulkan_AddTexture(albedoInfo->sampler , albedoInfo->imageView , albedoInfo->imageLayout ));
162 m_GBufferID.NormalID =
reinterpret_cast<ImTextureID>(ImGui_ImplVulkan_AddTexture(normalInfo->sampler , normalInfo->imageView , normalInfo->imageLayout ));
163 m_GBufferID.RoughnessID =
reinterpret_cast<ImTextureID>(ImGui_ImplVulkan_AddTexture(roughnessInfo->sampler , roughnessInfo->imageView , roughnessInfo->imageLayout ));
164 m_GBufferID.MetallicID =
reinterpret_cast<ImTextureID>(ImGui_ImplVulkan_AddTexture(metallicInfo->sampler , metallicInfo->imageView , metallicInfo->imageLayout ));
165 m_GBufferID.PositionID =
reinterpret_cast<ImTextureID>(ImGui_ImplVulkan_AddTexture(positionInfo->sampler , positionInfo->imageView , positionInfo->imageLayout ));
#define BIND_EVENT_FN(x)
Bind Event.
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
EventDispatcher(Event &event)
Constructor Function.
This Class store a Specific Event type first and Dispatch a event handle function to it.
This Class is the basic Event Class. Inherit from it and create specific event class.
FrameInfo Class. This class defines the FrameInfo data.
float m_Height
The slate height.
void QueryGBufferID()
Query GBufferID from RendererResourcePool.
bool OnSlateResized(SlateResizeEvent &event)
Event Dispatcher target. Registy on Slate(Viewport) Resized.
float m_Width
The slate width.
virtual void OnEvent(Event &event) override
This interface is called On Global Event Function Pointer is called.
ImguiGBufferVisualizer(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function.
virtual void OnRender() override
This interface is called On SlateRenderer Render.
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...
const uint32_t & GetHeight() const
Get New Viewport Height.
const uint32_t & GetWidth() const
Get New Viewport Width.
This Class is inherited from Event Class. Called by Viewport Resize.