mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-10-18 07:41:31 +11:00
21 lines
516 B
Plaintext
21 lines
516 B
Plaintext
|
#include "ntsc-pass2-vertex.inc"
|
||
|
#include "ntsc-decode-filter-2phase.inc"
|
||
|
#include "ntsc-rgbyuv.inc"
|
||
|
|
||
|
#define fetch_offset(offset, one_x) \
|
||
|
texture(Source, vTexCoord + vec2((offset) * (one_x), 0.0)).xyz
|
||
|
|
||
|
#define NTSC_CRT_GAMMA 2.4
|
||
|
|
||
|
#pragma stage fragment
|
||
|
layout(location = 0) in vec2 vTexCoord;
|
||
|
layout(location = 0) out vec4 FragColor;
|
||
|
layout(set = 0, binding = 2) uniform sampler2D Source;
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
#include "ntsc-pass2-decode.inc"
|
||
|
vec3 rgb = yiq2rgb(signal);
|
||
|
return vec4(pow(rgb, NTSC_CRT_GAMMA), 1.0);
|
||
|
}
|