VideoCommon: add custom pixel shader definition and custom shader header to shadergen common as it will be used by both the special and uber shader variant of pixel shaders

This commit is contained in:
iwubcode
2022-12-03 23:54:22 -06:00
parent f19651e49b
commit 0da5cf60a8
2 changed files with 106 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include <functional>
#include <iterator>
#include <string>
#include <string_view>
#include <type_traits>
#include <vector>
@ -327,3 +328,21 @@ static const char s_geometry_shader_uniforms[] = "\tfloat4 " I_STEREOPARAMS ";\n
"\tfloat4 " I_LINEPTPARAMS ";\n"
"\tint4 " I_TEXOFFSET ";\n"
"\tuint vs_expand;\n";
constexpr std::string_view CUSTOM_PIXELSHADER_COLOR_FUNC = "customShaderColor";
struct CustomPixelShader
{
std::string custom_shader;
bool operator==(const CustomPixelShader& other) const = default;
};
struct CustomPixelShaderContents
{
std::vector<CustomPixelShader> shaders;
bool operator==(const CustomPixelShaderContents& other) const = default;
};
void WriteCustomShaderStructDef(ShaderCode* out, u32 numtexgens);