mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-25 17:01:31 +11:00
update crt-guest to avoid scanline spikes
This commit is contained in:
parent
0da73d0494
commit
5aac649754
|
@ -1,4 +1,4 @@
|
|||
shaders = 10
|
||||
shaders = 11
|
||||
|
||||
shader0 = shaders/guest/lut/lut.slang
|
||||
filter_linear0 = false
|
||||
|
@ -61,8 +61,14 @@ scale_type8 = source
|
|||
scale8 = 1.0
|
||||
float_framebuffer8 = true
|
||||
|
||||
shader9 = shaders/guest/crt-guest-dr-venom.slang
|
||||
shader9 = shaders/guest/linearize_scanlines.slang
|
||||
filter_linear9 = true
|
||||
scale_type9 = viewport
|
||||
scale_x9 = 1.0
|
||||
scale_y9 = 1.0
|
||||
scale_type9 = source
|
||||
scale9 = 1.0
|
||||
float_framebuffer9 = true
|
||||
|
||||
shader10 = shaders/guest/crt-guest-dr-venom.slang
|
||||
filter_linear10 = true
|
||||
scale_type10 = viewport
|
||||
scale_x10 = 1.0
|
||||
scale_y10 = 1.0
|
||||
|
|
39
crt/shaders/guest/linearize_scanlines.slang
Normal file
39
crt/shaders/guest/linearize_scanlines.slang
Normal file
|
@ -0,0 +1,39 @@
|
|||
#version 450
|
||||
|
||||
layout(push_constant) uniform Push
|
||||
{
|
||||
vec4 SourceSize;
|
||||
vec4 OriginalSize;
|
||||
vec4 OutputSize;
|
||||
uint FrameCount;
|
||||
float SCANLINE_GAMMA;
|
||||
} params;
|
||||
|
||||
#pragma parameter SCANLINE_GAMMA "Scanline Spike Removal" 12.0 1.0 15.0 0.5
|
||||
#define SCANLINE_GAMMA params.SCANLINE_GAMMA
|
||||
|
||||
layout(std140, set = 0, binding = 0) uniform UBO
|
||||
{
|
||||
mat4 MVP;
|
||||
} global;
|
||||
|
||||
#pragma stage vertex
|
||||
layout(location = 0) in vec4 Position;
|
||||
layout(location = 1) in vec2 TexCoord;
|
||||
layout(location = 0) out vec2 vTexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = global.MVP * Position;
|
||||
vTexCoord = TexCoord;
|
||||
}
|
||||
|
||||
#pragma stage fragment
|
||||
layout(location = 0) in vec2 vTexCoord;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(set = 0, binding = 2) uniform sampler2D AfterglowPass;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(pow(vec3(texture(AfterglowPass, vTexCoord).rgb), vec3(SCANLINE_GAMMA)),1.0/SCANLINE_GAMMA);
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
shaders = "10"
|
||||
shaders = "11"
|
||||
|
||||
shader0 = "../crt/shaders/guest/lut/lut.slang"
|
||||
filter_linear0 = "false"
|
||||
|
@ -51,10 +51,17 @@ filter_linear8 = "false"
|
|||
scale_type8 = "source"
|
||||
scale8 = "1.000000"
|
||||
|
||||
shader9 = "../crt/shaders/guest/crt-guest-dr-venom.slang"
|
||||
filter_linear9 = "true"
|
||||
scale_type9 = "viewport"
|
||||
scale9 = "1.000000"
|
||||
shader9 = ../crt/shaders/guest/linearize_scanlines.slang
|
||||
filter_linear9 = true
|
||||
scale_type9 = source
|
||||
scale9 = 1.0
|
||||
float_framebuffer9 = true
|
||||
|
||||
shader10 = ../crt/shaders/guest/crt-guest-dr-venom.slang
|
||||
filter_linear10 = true
|
||||
scale_type10 = viewport
|
||||
scale_x10 = 1.0
|
||||
scale_y10 = 1.0
|
||||
|
||||
textures = "SamplerLUT1;SamplerLUT2;SamplerLUT3"
|
||||
SamplerLUT1 = "../crt/shaders/guest/lut/sony_trinitron1.png"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
shaders = 11
|
||||
shaders = 12
|
||||
|
||||
shader0 = ../ntsc/shaders/ntsc-pass1-composite-2phase.slang
|
||||
shader1 = ../ntsc/shaders/ntsc-pass2-2phase-gamma.slang
|
||||
|
@ -73,8 +73,14 @@ scale_type9 = source
|
|||
scale9 = 1.0
|
||||
float_framebuffer9 = true
|
||||
|
||||
shader10 = ../crt/shaders/guest/crt-guest-dr-venom.slang
|
||||
shader10 = ../crt/shaders/guest/linearize_scanlines.slang
|
||||
filter_linear10 = true
|
||||
scale_type10 = viewport
|
||||
scale_x10 = 1.0
|
||||
scale_y10 = 1.0
|
||||
scale_type10 = source
|
||||
scale10 = 1.0
|
||||
float_framebuffer10 = true
|
||||
|
||||
shader11 = ../crt/shaders/guest/crt-guest-dr-venom.slang
|
||||
filter_linear11 = true
|
||||
scale_type11 = viewport
|
||||
scale_x11 = 1.0
|
||||
scale_y11 = 1.0
|
||||
|
|
Loading…
Reference in a new issue