mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2025-02-23 18:17:44 +11:00
fix phosphorFeedback in geom-deluxe
This commit is contained in:
parent
599d385f3a
commit
4904f5c9c8
1 changed files with 3 additions and 3 deletions
|
@ -18,12 +18,12 @@ void main()
|
||||||
layout(location = 0) in vec2 vTexCoord;
|
layout(location = 0) in vec2 vTexCoord;
|
||||||
layout(location = 0) out vec4 FragColor;
|
layout(location = 0) out vec4 FragColor;
|
||||||
layout(set = 0, binding = 2) uniform sampler2D Source;
|
layout(set = 0, binding = 2) uniform sampler2D Source;
|
||||||
layout(set = 0, binding = 3) uniform sampler2D phosphor;
|
layout(set = 0, binding = 3) uniform sampler2D phosphorFeedback;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 screen = texture(Source, vTexCoord);
|
vec4 screen = texture(Source, vTexCoord);
|
||||||
vec4 phosphor = texture(phosphor, vTexCoord);
|
vec4 phosphor = texture(phosphorFeedback, vTexCoord);
|
||||||
|
|
||||||
vec3 lum = vec3(0.299,0.587,0.114);
|
vec3 lum = vec3(0.299,0.587,0.114);
|
||||||
float bscrn = dot(pow(screen.rgb,vec3(gamma)),lum);
|
float bscrn = dot(pow(screen.rgb,vec3(gamma)),lum);
|
||||||
|
@ -38,4 +38,4 @@ void main()
|
||||||
: vec4(phosphor.rg,
|
: vec4(phosphor.rg,
|
||||||
(floor(phosphor.b*255.0/4.0)*4.0 + floor(t/256.0))/255.0,
|
(floor(phosphor.b*255.0/4.0)*4.0 + floor(t/256.0))/255.0,
|
||||||
fract(t/256.0)*256.0/255.0 ) );
|
fract(t/256.0)*256.0/255.0 ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue