mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-25 08:51:32 +11:00
force srgb framebuffers in crt-royale passes
This commit is contained in:
parent
588bccd4a8
commit
0640cc2cca
0
blurs/blur9fast-horizontal-gamma-encode-every-fbo.slang
Normal file → Executable file
0
blurs/blur9fast-horizontal-gamma-encode-every-fbo.slang
Normal file → Executable file
0
blurs/blur9fast-horizontal-last-pass-gamma-encode-every-fbo.slang
Normal file → Executable file
0
blurs/blur9fast-horizontal-last-pass-gamma-encode-every-fbo.slang
Normal file → Executable file
0
blurs/blur9fast-horizontal-last-pass.slang
Normal file → Executable file
0
blurs/blur9fast-horizontal-last-pass.slang
Normal file → Executable file
3
blurs/blur9fast-horizontal.slang
Normal file → Executable file
3
blurs/blur9fast-horizontal.slang
Normal file → Executable file
|
@ -63,6 +63,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
/////////////////////////////// FRAGMENT SHADER //////////////////////////////
|
/////////////////////////////// FRAGMENT SHADER //////////////////////////////
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 tex_uv;
|
layout(location = 0) in vec2 tex_uv;
|
||||||
layout(location = 1) in vec2 blur_dxdy;
|
layout(location = 1) in vec2 blur_dxdy;
|
||||||
layout(location = 0) out vec4 FragColor;
|
layout(location = 0) out vec4 FragColor;
|
||||||
|
@ -73,4 +74,4 @@ void main()
|
||||||
vec3 color = tex2Dblur9fast(Source, tex_uv, blur_dxdy);
|
vec3 color = tex2Dblur9fast(Source, tex_uv, blur_dxdy);
|
||||||
// Encode and output the blurred image:
|
// Encode and output the blurred image:
|
||||||
FragColor = encode_output(vec4(color, 1.0));
|
FragColor = encode_output(vec4(color, 1.0));
|
||||||
}
|
}
|
||||||
|
|
0
blurs/blur9fast-vertical-gamma-encode-every-fbo.slang
Normal file → Executable file
0
blurs/blur9fast-vertical-gamma-encode-every-fbo.slang
Normal file → Executable file
3
blurs/blur9fast-vertical.slang
Normal file → Executable file
3
blurs/blur9fast-vertical.slang
Normal file → Executable file
|
@ -63,6 +63,7 @@ layout(std140, set = 0, binding = 0) uniform UBO
|
||||||
/////////////////////////////// FRAGMENT SHADER //////////////////////////////
|
/////////////////////////////// FRAGMENT SHADER //////////////////////////////
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 tex_uv;
|
layout(location = 0) in vec2 tex_uv;
|
||||||
layout(location = 1) in vec2 blur_dxdy;
|
layout(location = 1) in vec2 blur_dxdy;
|
||||||
layout(location = 0) out vec4 FragColor;
|
layout(location = 0) out vec4 FragColor;
|
||||||
|
@ -73,4 +74,4 @@ void main()
|
||||||
vec3 color = tex2Dblur9fast(Source, tex_uv, blur_dxdy);
|
vec3 color = tex2Dblur9fast(Source, tex_uv, blur_dxdy);
|
||||||
// Encode and output the blurred image:
|
// Encode and output the blurred image:
|
||||||
FragColor = encode_output(vec4(color, 1.0));
|
FragColor = encode_output(vec4(color, 1.0));
|
||||||
}
|
}
|
||||||
|
|
3
crt/shaders/crt-royale/src/crt-royale-bloom-approx.slang
Normal file → Executable file
3
crt/shaders/crt-royale/src/crt-royale-bloom-approx.slang
Normal file → Executable file
|
@ -216,6 +216,7 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 tex_uv;
|
layout(location = 0) in vec2 tex_uv;
|
||||||
layout(location = 1) in float estimated_viewport_size_x;
|
layout(location = 1) in float estimated_viewport_size_x;
|
||||||
layout(location = 2) in vec2 blur_dxdy;
|
layout(location = 2) in vec2 blur_dxdy;
|
||||||
|
@ -350,4 +351,4 @@ void main()
|
||||||
}
|
}
|
||||||
// Encode and output the blurred image:
|
// Encode and output the blurred image:
|
||||||
FragColor = vec4(color, 1.0);
|
FragColor = vec4(color, 1.0);
|
||||||
}
|
}
|
||||||
|
|
3
crt/shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang
Normal file → Executable file
3
crt/shaders/crt-royale/src/crt-royale-bloom-horizontal-reconstitute.slang
Normal file → Executable file
|
@ -83,6 +83,7 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 video_uv;
|
layout(location = 0) in vec2 video_uv;
|
||||||
layout(location = 1) in vec2 scanline_tex_uv;
|
layout(location = 1) in vec2 scanline_tex_uv;
|
||||||
layout(location = 2) in vec2 halation_tex_uv;
|
layout(location = 2) in vec2 halation_tex_uv;
|
||||||
|
@ -128,4 +129,4 @@ void main()
|
||||||
|
|
||||||
// Encode and output the bloomed image:
|
// Encode and output the bloomed image:
|
||||||
FragColor = encode_output(vec4(final_bloom, 1.0));
|
FragColor = encode_output(vec4(final_bloom, 1.0));
|
||||||
}
|
}
|
||||||
|
|
3
crt/shaders/crt-royale/src/crt-royale-bloom-vertical.slang
Normal file → Executable file
3
crt/shaders/crt-royale/src/crt-royale-bloom-vertical.slang
Normal file → Executable file
|
@ -69,6 +69,7 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 tex_uv;
|
layout(location = 0) in vec2 tex_uv;
|
||||||
layout(location = 1) in vec2 bloom_dxdy;
|
layout(location = 1) in vec2 bloom_dxdy;
|
||||||
layout(location = 2) in float bloom_sigma_runtime;
|
layout(location = 2) in float bloom_sigma_runtime;
|
||||||
|
@ -83,4 +84,4 @@ void main()
|
||||||
bloom_dxdy, bloom_sigma);
|
bloom_dxdy, bloom_sigma);
|
||||||
// Encode and output the blurred image:
|
// Encode and output the blurred image:
|
||||||
FragColor = encode_output(vec4(color, 1.0));
|
FragColor = encode_output(vec4(color, 1.0));
|
||||||
}
|
}
|
||||||
|
|
3
crt/shaders/crt-royale/src/crt-royale-brightpass.slang
Normal file → Executable file
3
crt/shaders/crt-royale/src/crt-royale-brightpass.slang
Normal file → Executable file
|
@ -73,6 +73,7 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 video_uv;
|
layout(location = 0) in vec2 video_uv;
|
||||||
layout(location = 1) in vec2 scanline_tex_uv;
|
layout(location = 1) in vec2 scanline_tex_uv;
|
||||||
layout(location = 2) in float bloom_sigma_runtime;
|
layout(location = 2) in float bloom_sigma_runtime;
|
||||||
|
@ -139,4 +140,4 @@ void main()
|
||||||
mix(blur_ratio, vec3(1.0), params.bloom_excess);
|
mix(blur_ratio, vec3(1.0), params.bloom_excess);
|
||||||
|
|
||||||
FragColor = encode_output(vec4(brightpass, 1.0));
|
FragColor = encode_output(vec4(brightpass, 1.0));
|
||||||
}
|
}
|
||||||
|
|
3
crt/shaders/crt-royale/src/crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang
Normal file → Executable file
3
crt/shaders/crt-royale/src/crt-royale-first-pass-linearize-crt-gamma-bob-fields.slang
Normal file → Executable file
|
@ -65,6 +65,7 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 tex_uv;
|
layout(location = 0) in vec2 tex_uv;
|
||||||
layout(location = 1) in vec2 uv_step;
|
layout(location = 1) in vec2 uv_step;
|
||||||
layout(location = 0) out vec4 FragColor;
|
layout(location = 0) out vec4 FragColor;
|
||||||
|
@ -110,4 +111,4 @@ if(interlace_detect == true)
|
||||||
{
|
{
|
||||||
FragColor = encode_output(tex2D_linearize(Source, tex_uv));
|
FragColor = encode_output(tex2D_linearize(Source, tex_uv));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
0
crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass-backup.slang
Normal file → Executable file
0
crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass-backup.slang
Normal file → Executable file
0
crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.slang
Normal file → Executable file
0
crt/shaders/crt-royale/src/crt-royale-geometry-aa-last-pass.slang
Normal file → Executable file
0
crt/shaders/crt-royale/src/crt-royale-mask-resize-horizontal.slang
Normal file → Executable file
0
crt/shaders/crt-royale/src/crt-royale-mask-resize-horizontal.slang
Normal file → Executable file
0
crt/shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang
Normal file → Executable file
0
crt/shaders/crt-royale/src/crt-royale-mask-resize-vertical.slang
Normal file → Executable file
3
crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang
Normal file → Executable file
3
crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang
Normal file → Executable file
|
@ -116,6 +116,7 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 video_uv;
|
layout(location = 0) in vec2 video_uv;
|
||||||
layout(location = 1) in vec2 scanline_tex_uv;
|
layout(location = 1) in vec2 scanline_tex_uv;
|
||||||
layout(location = 2) in vec2 blur3x3_tex_uv;
|
layout(location = 2) in vec2 blur3x3_tex_uv;
|
||||||
|
@ -290,4 +291,4 @@ void main()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FragColor = encode_output(vec4(pixel_color, 1.0));
|
FragColor = encode_output(vec4(pixel_color, 1.0));
|
||||||
}
|
}
|
||||||
|
|
3
crt/shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang
Normal file → Executable file
3
crt/shaders/crt-royale/src/crt-royale-scanlines-vertical-interlacing.slang
Normal file → Executable file
|
@ -74,6 +74,7 @@ void main()
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma stage fragment
|
#pragma stage fragment
|
||||||
|
#pragma format R8G8B8A8_SRGB
|
||||||
layout(location = 0) in vec2 tex_uv;
|
layout(location = 0) in vec2 tex_uv;
|
||||||
layout(location = 1) in vec2 uv_step;
|
layout(location = 1) in vec2 uv_step;
|
||||||
layout(location = 2) in vec2 il_step_multiple;
|
layout(location = 2) in vec2 il_step_multiple;
|
||||||
|
@ -238,4 +239,4 @@ void main()
|
||||||
// the alpha channel, but it wasn't working, at least not reliably. This
|
// the alpha channel, but it wasn't working, at least not reliably. This
|
||||||
// is faster anyway, levels_autodim_temp = 0.5 isn't causing banding.
|
// is faster anyway, levels_autodim_temp = 0.5 isn't causing banding.
|
||||||
FragColor = vec4(encode_output(vec4(scanline_intensity * levels_autodim_temp, 1.0)));
|
FragColor = vec4(encode_output(vec4(scanline_intensity * levels_autodim_temp, 1.0)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue