mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-19 15:24:28 +02: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
843 B
C++
37 lines
843 B
C++
#pragma once
|
|
|
|
#include <nvrhi/nvrhi.h>
|
|
#include <vector>
|
|
|
|
import eu07.glm;
|
|
struct Bloom {
|
|
struct BloomConstants {
|
|
glm::vec4 m_prefilter_vector;
|
|
float m_mix_factor;
|
|
};
|
|
float m_threshold = 3.f;
|
|
float m_knee = .6f;
|
|
float m_mix_factor = .04f;
|
|
bool m_gui_active = false;
|
|
void UpdateConstants(nvrhi::ICommandList* command_list);
|
|
void OnGui();
|
|
void ShowGui();
|
|
Bloom(class NvRendererBackend* backend) : m_backend(backend) {}
|
|
|
|
void Init(nvrhi::ITexture* texture);
|
|
void Render(nvrhi::ICommandList* command_list);
|
|
|
|
nvrhi::TextureHandle m_working_texture;
|
|
nvrhi::BufferHandle m_constant_buffer;
|
|
|
|
struct BloomStage {
|
|
int m_width;
|
|
int m_height;
|
|
nvrhi::BindingSetHandle m_binding_set;
|
|
nvrhi::ComputePipelineHandle m_pso;
|
|
};
|
|
|
|
std::vector<BloomStage> m_stages;
|
|
|
|
class NvRendererBackend* m_backend;
|
|
}; |