17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-25 20:47:07 +01:00
Files
maszyna/betterRenderer/renderer/source/ssao.h
maj00r 7667d8d4d3 build betterRenderer against the modules
Verified locally now that Vulkan and DXC are installed: all 31 targets
compile. glm has to come from eu07.glm only - having it both as a plain
include and as an import made every overload ambiguous. nvrenderer.h is
self-sufficient, since register.cpp includes nothing else. Fixes the
vcpkg triplet, which was pinned to x64-windows.
2026-09-09 23:45:53 +02:00

60 lines
1.6 KiB
C++

#pragma once
#include <nvrhi/nvrhi.h>
#include <memory>
#include "XeGTAO.h"
import eu07.glm;
struct NvSsao {
NvSsao(class NvRenderer* renderer);
void Init();
XeGTAO::GTAOSettings settings{};
class NvRendererBackend* m_backend;
struct NvGbuffer* m_gbuffer;
nvrhi::ShaderHandle m_CSPrefilterDepths16x16;
nvrhi::ComputePipelineHandle m_PSOPrefilterDepths;
nvrhi::BindingSetHandle m_BSPrefilterDepths;
nvrhi::SamplerHandle m_SamplerPoint;
nvrhi::ShaderHandle m_CSGTAOLow;
nvrhi::ShaderHandle m_CSGTAOMedium;
nvrhi::ShaderHandle m_CSGTAOHigh;
nvrhi::ShaderHandle m_CSGTAOUltra;
std::array<nvrhi::ComputePipelineHandle, 4> m_PSOGTAO;
nvrhi::BindingSetHandle m_BSGTAO;
nvrhi::ShaderHandle m_CSDenoisePass;
nvrhi::ShaderHandle m_CSDenoiseLastPass;
nvrhi::ComputePipelineHandle m_PSODenoise;
nvrhi::ComputePipelineHandle m_PSODenoiseLastPass;
nvrhi::BindingLayoutHandle m_BLDenoise;
nvrhi::BindingSetHandle m_BSDenoise;
nvrhi::ShaderHandle m_CSGenerateNormals;
nvrhi::ComputePipelineHandle m_PSOGenerateNormals;
nvrhi::BindingSetHandle m_BSGenerateNormals;
nvrhi::TextureHandle m_workingDepths;
nvrhi::TextureHandle m_workingEdges;
nvrhi::TextureHandle m_workingAOTerm;
nvrhi::TextureHandle m_workingAOTermPong;
nvrhi::TextureHandle m_workingNormals;
nvrhi::TextureHandle m_debugImage;
nvrhi::TextureHandle m_outputAO;
nvrhi::BufferHandle m_constantBuffer;
int m_width;
int m_height;
void Render(nvrhi::ICommandList* command_list, const glm::mat4& projection,
size_t frame_index);
void OnGui(bool open_now);
};