mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-30 11:21:32 +11:00
858404b1db
Based on CRT Royale, this filter includes a lot of cool features: - Horizontal ringing (produced by low pass filters e.g. SNES video output) - CVBS / S-VIDEO / RGB filter modes - Accurate pixel perfect dimensions (for 1080 resolutions and up) - TV frames that reminds the 90's experience - PC monitor frame also available - New adjustable scale system to fix image size and overscans - Ambient lighting and rear LED simulation modes - Reflections over the screen borders - Nice bulged screen finish - Auto scales to any resolution, preserving 4:3 ratio - 3 shaders available: normal mode, fast mode and doubled outputs mode Glcore and d3d11 drivers supported at the moment.
21 lines
339 B
C++
21 lines
339 B
C++
const mat3 yiq2rgb_mat = mat3(
|
|
1.0, 0.956, 0.6210,
|
|
1.0, -0.2720, -0.6474,
|
|
1.0, -1.1060, 1.7046);
|
|
|
|
vec3 yiq2rgb(vec3 yiq)
|
|
{
|
|
return yiq * yiq2rgb_mat;
|
|
}
|
|
|
|
const mat3 yiq_mat = mat3(
|
|
0.2989, 0.5870, 0.1140,
|
|
0.5959, -0.2744, -0.3216,
|
|
0.2115, -0.5229, 0.3114
|
|
);
|
|
|
|
vec3 rgb2yiq(vec3 col)
|
|
{
|
|
return col * yiq_mat;
|
|
}
|