mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-23 00:01:31 +11:00
gbc-color: Add darken screen parameter
This commit is contained in:
parent
b248b77cf0
commit
9afc9923f7
|
@ -10,6 +10,11 @@
|
|||
License: Public domain
|
||||
*/
|
||||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
float darken_screen;
|
||||
} params;
|
||||
|
||||
layout(std140, set = 0, binding = 0) uniform UBO
|
||||
{
|
||||
mat4 MVP;
|
||||
|
@ -18,6 +23,8 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
|||
vec4 SourceSize;
|
||||
} global;
|
||||
|
||||
#pragma parameter darken_screen "Darken Screen" 0.0 -0.25 2.0 0.05
|
||||
|
||||
#define target_gamma 2.2
|
||||
#define display_gamma 2.2
|
||||
#define blr 0.0
|
||||
|
@ -33,7 +40,6 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
|||
#define br 0.0
|
||||
#define bg 0.275000
|
||||
|
||||
|
||||
#pragma stage vertex
|
||||
layout(location = 0) in vec4 Position;
|
||||
layout(location = 1) in vec2 TexCoord;
|
||||
|
@ -52,7 +58,7 @@ layout(set = 0, binding = 2) uniform sampler2D Source;
|
|||
|
||||
void main()
|
||||
{
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(target_gamma)).rgba;
|
||||
vec4 screen = pow(texture(Source, vTexCoord), vec4(target_gamma + params.darken_screen)).rgba;
|
||||
|
||||
// red green blue alpha ; alpha does nothing for our purposes
|
||||
mat4 color = mat4(r, rg, rb, 0.0, //red
|
||||
|
|
Loading…
Reference in a new issue