docs: README update

This commit is contained in:
2025-11-24 00:28:59 +01:00
parent 3dceb044aa
commit aa42e9d2aa
6 changed files with 25 additions and 10 deletions
+3 -1
View File
@@ -8,7 +8,7 @@
in vec2 vUV;
out vec4 fragColor;
#include inc_yuv.glsl
#include inc_yuyv.glsl
uniform sampler2D iTex0;
uniform sampler2D iTex1;
@@ -18,6 +18,8 @@ uniform vec2 iInputResolution1;
void main() {
if (iInputFormat1 == YUYV_FOURCC) {
fragColor = yuyvTex(iTex1, vUV, int(iInputResolution1.x));
} else if (iInputResolution1.x > 0) {
fragColor = texture(iTex1, vUV);
} else {
fragColor = texture(iTex0, vUV);
}
+3 -1
View File
@@ -8,7 +8,7 @@
in vec2 vUV;
out vec4 fragColor;
#include inc_yuv.glsl
#include inc_yuyv.glsl
uniform sampler2D iTex0;
uniform sampler2D iTex2;
@@ -18,6 +18,8 @@ uniform vec2 iInputResolution2;
void main() {
if (iInputFormat2 == YUYV_FOURCC) {
fragColor = yuyvTex(iTex2, vUV, int(iInputResolution2.x));
} else if (iInputResolution2.x > 0) {
fragColor = texture(iTex2, vUV);
} else {
fragColor = texture(iTex0, vUV);
}
+1 -1
View File
@@ -1,6 +1,6 @@
#include inc_magic.glsl
#include inc_functions.glsl
#include inc_yuv.glsl
#include inc_yuyv.glsl
#include inc_cp437.glsl
#ifndef INC_DEBUG
@@ -1,9 +1,9 @@
#ifndef INC_YUV
#define INC_YUV
#ifndef INC_YUYV
#define INC_YUYV
const int YUYV_FOURCC = 1448695129;
const mat3x3 yuv_to_rgb = {{1,1,1},{0,-0.39465,2.03211},{1.13983,-0.5806,0}};
const mat3x3 yuyv_to_rgb = {{1,1,1},{0,-0.39465,2.03211},{1.13983,-0.5806,0}};
vec4 yuyvTex(sampler2D tex, vec2 vUV, int base_width) {
float w = base_width - 1;
@@ -22,7 +22,7 @@ vec4 yuyvTex(sampler2D tex, vec2 vUV, int base_width) {
tV.y - 0.5
);
return vec4(yuv_to_rgb * yuv, 1.0);
return vec4(yuyv_to_rgb * yuv, 1.0);
}
#endif