VideoCommon: move to a 'process_fragment()' function to simplify custom shaders and provide a direct override of the tev stage logic

This commit is contained in:
iwubcode
2025-03-15 17:29:13 -05:00
parent 0afbeae70c
commit 8e253518e6
10 changed files with 303 additions and 912 deletions

View File

@ -158,15 +158,19 @@ struct pixel_shader_uid_data
using PixelShaderUid = ShaderUid<pixel_shader_uid_data>;
void WriteCustomShaderStructImpl(ShaderCode* out, u32 num_stages, bool per_pixel_lighting,
const pixel_shader_uid_data* uid_data);
struct CustomPixelContents
{
std::string_view shader = "";
std::string_view uniforms = "";
};
ShaderCode GeneratePixelShaderCode(APIType api_type, const ShaderHostConfig& host_config,
const pixel_shader_uid_data* uid_data,
const CustomPixelShaderContents& custom_details);
CustomPixelContents custom_contents);
void WritePixelShaderCommonHeader(ShaderCode& out, APIType api_type,
const ShaderHostConfig& host_config, bool bounding_box,
const CustomPixelShaderContents& custom_details);
const ShaderHostConfig& host_config, bool bounding_box);
void WriteFragmentBody(APIType api_type, const ShaderHostConfig& host_config,
const pixel_shader_uid_data* uid_data, ShaderCode& out);
void ClearUnusedPixelShaderUidBits(APIType api_type, const ShaderHostConfig& host_config,
PixelShaderUid* uid);
PixelShaderUid GetPixelShaderUid();