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:
iwubcode
2023-01-07 12:30:29 -06:00
parent 675544ec2b
commit 931a8aa413
7 changed files with 24 additions and 1 deletions

View File

@ -105,6 +105,7 @@ vec4 custom_main( in CustomShaderData data )
|``tev_stages`` | CustomShaderTevStage[] | v1 | An array of TEV stages, the amount is specified by ``tev_stage_count`` |
|``tev_stage_count`` | uint | v1 | The count of TEV stages |
|``final_color`` | vec4 | v1 | The final color generated by Dolphin after all TEV stages are executed |
|``time_ms`` | uint | v1 | The time that has passed in milliseconds, since the game was started. Useful for animating |
`CustomShaderLightData` is used to denote lighting data the game is applying when rendering the specific draw call. It has the following structure:
@ -247,4 +248,4 @@ vec4 custom_main( in CustomShaderData data )
}
return vec4(total_diffuse * vec3(0, 0, 1), 1);
}
```
```