17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 05:39:19 +02:00
Files
maszyna/betterRenderer/renderer/source/auto_exposure.h
maj00r 26501b0fd7 hoist standard includes above everything else
Ordering them before the imports in the same file was not enough: a
project header on line 1 can import a module several levels down whose
global module fragment already pulled in the same standard header, and
that include guard does not cross the module boundary. Putting them
first means the guard is set before anything can import.

Skips vendored single-header libraries and anything inside an #if.
2026-09-10 01:02:17 +02:00

40 lines
935 B
C++

#pragma once
#include <cstdint>
#include "nvrenderer/resource_registry.h"
#include <nvrhi/nvrhi.h>
class NvRenderer;
class NvRendererBackend;
struct MaAutoExposure : public MaResourceRegistry {
MaAutoExposure(NvRenderer* renderer);
void Init();
void Render(nvrhi::ICommandList* command_list);
uint32_t m_width;
uint32_t m_height;
uint32_t m_num_mips;
struct PushConstantsAutoExposure {
uint32_t m_num_mips;
uint32_t m_num_workgroups;
float m_delta_time;
float m_min_luminance_ev;
float m_max_luminance_ev;
};
NvRendererBackend* m_backend;
nvrhi::TextureHandle m_output_exposure_fsr2;
nvrhi::TextureHandle m_6th_mip_img;
nvrhi::BufferHandle m_atomic_counter;
nvrhi::BindingSetHandle m_bindings_auto_exposure;
nvrhi::ComputePipelineHandle m_pso_auto_exposure;
nvrhi::BindingSetHandle m_bindings_auto_exposure_apply;
nvrhi::ComputePipelineHandle m_pso_auto_exposure_apply;
};