2019-03-05 03:59:17 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-03-05 08:21:39 +00:00
|
|
|
#include <functional>
|
2019-03-05 18:49:06 +00:00
|
|
|
#include <map>
|
2019-03-05 08:21:39 +00:00
|
|
|
|
2019-03-05 18:49:06 +00:00
|
|
|
#include "hwrenderer/postprocessing/hw_postprocess.h"
|
2019-03-05 03:59:17 +00:00
|
|
|
#include "vulkan/system/vk_objects.h"
|
|
|
|
|
|
|
|
class FString;
|
|
|
|
|
2019-03-05 18:49:06 +00:00
|
|
|
class VkPPShader;
|
|
|
|
class VkPPTexture;
|
|
|
|
|
2019-03-05 03:59:17 +00:00
|
|
|
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);
|
2019-03-05 03:59:17 +00:00
|
|
|
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;
|
2019-03-05 03:59:17 +00:00
|
|
|
};
|