17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 21:59:18 +02:00
Files
maszyna/betterRenderer/renderer/source/windshield_rain.h
maj00r 2695c8e525 include what you use in betterRenderer
Its sources reached the standard library through the project headers they
included; those are imports now. 178 headers across 56 files, plus 18 C
library headers elsewhere for memcpy/printf and friends. MSVC's STL does
not supply these transitively the way libstdc++ does.
2026-09-10 00:26:55 +02:00

49 lines
1.2 KiB
C++

#pragma once
#include "nvrenderer/nvrenderer.h"
#include <cstddef>
#include <cstdint>
#include <unordered_map>
struct WindshieldRain {
void Init(NvRenderer *in_renderer);
void Resize(int width, int height);
uint32_t width;
uint32_t height;
[[nodiscard]] nvrhi::ITexture *GetTexture() const;
void Render(NvRenderer::RenderPass const &pass);
bool IsRainShader(NvRenderer::MaterialTemplate const *mt) const;
size_t texture_handle_droplets;
size_t texture_handle_wipermask;
nvrhi::TextureHandle texture_droplets;
nvrhi::SamplerHandle sampler;
nvrhi::SamplerHandle sampler_point;
void CreatePso(nvrhi::ICommandList *command_list);
NvRenderer *renderer;
nvrhi::FramebufferHandle framebuffer;
nvrhi::TextureHandle tex_droplets;
nvrhi::TextureHandle tex_depth;
nvrhi::TextureHandle tex_depth_temp;
nvrhi::ShaderHandle ps_rain_anim;
nvrhi::ShaderHandle vs_rain_anim;
nvrhi::ShaderHandle cs_max_depth;
nvrhi::BindingSetHandle bindings;
nvrhi::BindingSetHandle bindings_max_depth;
nvrhi::GraphicsPipelineHandle pso_droplets;
nvrhi::ComputePipelineHandle pso_max_depth;
nvrhi::BindingLayoutHandle binding_layout;
std::unordered_map<size_t, nvrhi::BindingSetHandle> binding_sets_per_material;
};