VideoCommon: move vertex shader gen logic to a 'process_vertex()' function, to eventually allow for custom shaders to override vertex logic

This commit is contained in:
iwubcode
2025-05-17 19:45:58 -05:00
parent 66b8fa03cb
commit b23dddea4e
3 changed files with 294 additions and 93 deletions

View File

@ -88,6 +88,15 @@ struct vertex_shader_uid_data
using VertexShaderUid = ShaderUid<vertex_shader_uid_data>;
struct CustomVertexContents
{
std::string_view shader = "";
std::string_view uniforms = "";
};
VertexShaderUid GetVertexShaderUid();
ShaderCode GenerateVertexShaderCode(APIType api_type, const ShaderHostConfig& host_config,
const vertex_shader_uid_data* uid_data);
const vertex_shader_uid_data* uid_data,
CustomVertexContents custom_contents);
void WriteVertexBody(APIType api_type, const ShaderHostConfig& host_config,
const vertex_shader_uid_data* uid_data, ShaderCode& out);