mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 06:48:33 +00:00
VideoCommon: add milliseconds elapsed time value to pixel shaders as a uniform to be able to support animation effects in custom shaders
This commit is contained in:
parent
675544ec2b
commit
931a8aa413
7 changed files with 24 additions and 1 deletions
|
@ -406,6 +406,7 @@ void WritePixelShaderCommonHeader(ShaderCode& out, APIType api_type,
|
|||
"\tbool blend_subtract_alpha;\n"
|
||||
"\tbool logic_op_enable;\n"
|
||||
"\tuint logic_op_mode;\n"
|
||||
"\tuint time_ms;\n"
|
||||
"}};\n\n");
|
||||
out.Write("#define bpmem_combiners(i) (bpmem_pack1[(i)].xy)\n"
|
||||
"#define bpmem_tevind(i) (bpmem_pack1[(i)].z)\n"
|
||||
|
@ -869,6 +870,9 @@ void WriteCustomShaderStructImpl(ShaderCode* out, u32 num_stages, bool per_pixel
|
|||
// Actual data will be filled out in the tev stage code, just set the
|
||||
// stage count for now
|
||||
out->Write("\tcustom_data.tev_stage_count = {};\n", num_stages);
|
||||
|
||||
// Time
|
||||
out->Write("\tcustom_data.time_ms = time_ms;\n");
|
||||
}
|
||||
|
||||
static void WriteStage(ShaderCode& out, const pixel_shader_uid_data* uid_data, int n,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue