I’m not sure how to do that exactly but here’s a code block from ntsc-pass1-composite-2phase. (This is the only one that does it, neither of the 3phase pass1 do this.)
// vertex compatibility #defines
#define vTexCoord TEX0.xy
#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize
#define outsize vec4(OutputSize, 1.0 / OutputSize)
void main()
{
gl_Position = MVPMatrix * VertexCoord;
COL0 = COLOR;
TEX0.xy = TexCoord.xy;
pix_no = vTexCoord * SourceSize.xy * (outsize.xy / InputSize.xy);
}
#elif defined(FRAGMENT)
#pragma format R8G8B8A8_SRGB
#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
And here’s the same section but from ntsc-pass1-svideo-2phase
// vertex compatibility #defines
#define vTexCoord TEX0.xy
#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize
#define outsize vec4(OutputSize, 1.0 / OutputSize)
void main()
{
gl_Position = MVPMatrix * VertexCoord;
COL0 = COLOR;
TEX0.xy = TexCoord.xy;
pix_no = vTexCoord * SourceSize.xy * (outsize.xy / InputSize.xy);
}
#elif defined(FRAGMENT)
#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
This is for the glsl versions, in the slang versions neither of these shaders use this: (At least from what I can see.
#pragma format R8G8B8A8_SRGB