mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-25 17:01:31 +11:00
add threshold parameter to kawase blur for use in blooms
This commit is contained in:
parent
12b0d8eb8f
commit
502d05e1f4
|
@ -10,8 +10,11 @@ layout(push_constant) uniform Push
|
||||||
vec4 OriginalSize;
|
vec4 OriginalSize;
|
||||||
vec4 OutputSize;
|
vec4 OutputSize;
|
||||||
uint FrameCount;
|
uint FrameCount;
|
||||||
|
float bloom_threshold;
|
||||||
} params;
|
} params;
|
||||||
|
|
||||||
|
#pragma parameter bloom_threshold "Glow Threshold" 0.0 0.0 1.0 0.05
|
||||||
|
|
||||||
layout(std140, set = 0, binding = 0) uniform UBO
|
layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
{
|
{
|
||||||
mat4 MVP;
|
mat4 MVP;
|
||||||
|
@ -47,7 +50,9 @@ vec4 reSample(float d, vec2 uv, sampler2D decal)
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "../../misc/colorspace-tools.h"
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
FragColor = reSample(0., vTexCoord, Source);
|
FragColor = vec4(YIQtoRGB(RGBtoYIQ(reSample(0., vTexCoord, Source).rgb) - vec3(params.bloom_threshold, 0.,0.)), 1.0);
|
||||||
}
|
}
|
Loading…
Reference in a new issue