mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-29 10:27:32 +01:00
A header first pulled in through an imported module's global module fragment leaves no include guard in the importing unit - macros do not cross a module boundary - so a later textual include parses it again and MSVC rejects the redefinition. Redoes the betterRenderer sweep with placement that stays out of #if blocks, which is where the previous one dropped <fstream> and broke nvrenderer_d3d12.cpp.
37 lines
1.0 KiB
C++
37 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <nvrhi/nvrhi.h>
|
|
#include <cstdint>
|
|
|
|
import eu07.glm;
|
|
struct MaContactShadows {
|
|
MaContactShadows(class NvRenderer* renderer, class NvGbuffer* gbuffer);
|
|
void Init();
|
|
void Render(nvrhi::ICommandList* command_list);
|
|
void UpdateConstants(nvrhi::ICommandList* command_list,
|
|
const glm::dmat4& projection, const glm::dmat4& view,
|
|
const glm::dvec3& light, uint64_t frame_index);
|
|
|
|
struct ComputeConstants {
|
|
glm::mat4 g_Projection;
|
|
glm::mat4 g_InverseProjection;
|
|
glm::vec3 g_LightDirView;
|
|
float g_NumSamples;
|
|
float g_SampleRange;
|
|
float g_Thickness;
|
|
uint32_t g_FrameIndex;
|
|
};
|
|
|
|
nvrhi::BindingLayoutHandle m_binding_layout;
|
|
nvrhi::BindingSetHandle m_binding_set;
|
|
nvrhi::ComputePipelineHandle m_pipeline;
|
|
nvrhi::ShaderHandle m_compute_shader;
|
|
nvrhi::BufferHandle m_constant_buffer;
|
|
|
|
nvrhi::TextureHandle m_output_texture;
|
|
|
|
class NvRendererBackend* m_backend;
|
|
class NvGbuffer* m_gbuffer;
|
|
int m_width;
|
|
int m_height;
|
|
}; |