qzdoom/src/rendering/vulkan/renderer/vk_postprocess.h

58 lines
1.2 KiB
C
Raw Normal View History

#pragma once
#include <functional>
2019-03-05 18:49:06 +00:00
#include <map>
2019-03-05 18:49:06 +00:00
#include "hwrenderer/postprocessing/hw_postprocess.h"
#include "vulkan/system/vk_objects.h"
class FString;
2019-03-05 18:49:06 +00:00
class VkPPShader;
class VkPPTexture;
class VkPostprocess
{
public:
VkPostprocess();
~VkPostprocess();
void RenderBuffersReset();
void PostProcessScene(int fixedcm, const std::function<void()> &afterBloomDrawEndScene2D);
void AmbientOccludeScene(float m5);
void BlurScene(float gameinfobluramount);
void ClearTonemapPalette();
private:
void UpdateEffectTextures();
void CompileEffectShaders();
2019-03-05 18:49:06 +00:00
FString LoadShaderCode(const FString &lumpname, const FString &defines, int version);
void RenderEffect(const FString &name);
void NextEye(int eyeCount);
void RenderScreenQuad();
2019-03-05 18:49:06 +00:00
std::map<PPTextureName, std::unique_ptr<VkPPTexture>> mTextures;
std::map<PPShaderName, std::unique_ptr<VkPPShader>> mShaders;
const static int uniformbindingpoint = 7;
};
class VkPPShader
{
public:
std::unique_ptr<VulkanShader> VertexShader;
std::unique_ptr<VulkanShader> FragmentShader;
};
class VkPPTexture
{
public:
std::unique_ptr<VulkanImage> Image;
std::unique_ptr<VulkanImageView> View;
2019-03-05 19:39:27 +00:00
std::unique_ptr<VulkanBuffer> Staging;
VkImageLayout Layout = VK_IMAGE_LAYOUT_UNDEFINED;
};