docs: README update
This commit is contained in:
+2
-2
@@ -5,6 +5,6 @@ forge_CFLAGS = -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays
|
|||||||
forge_LDADD = -lm -lGL -lglfw -lasound -lbsd
|
forge_LDADD = -lm -lGL -lglfw -lasound -lbsd
|
||||||
include_HEADERS = src/args.h src/arr.h src/config.h src/config_file.h src/constants.h src/file.h src/forge.h src/main.h src/midi.h src/project.h src/rand.h src/shaders.h src/shared.h src/state.h src/string.h src/tempo.h src/timer.h src/types.h src/video.h src/window.h $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/glad/egl.h $(top_srcdir)/include/linmath.h $(top_srcdir)/include/hashmap.h $(top_srcdir)/include/log.h
|
include_HEADERS = src/args.h src/arr.h src/config.h src/config_file.h src/constants.h src/file.h src/forge.h src/main.h src/midi.h src/project.h src/rand.h src/shaders.h src/shared.h src/state.h src/string.h src/tempo.h src/timer.h src/types.h src/video.h src/window.h $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/glad/egl.h $(top_srcdir)/include/linmath.h $(top_srcdir)/include/hashmap.h $(top_srcdir)/include/log.h
|
||||||
|
|
||||||
EXTRA_DIST = default/forge_project.cfg default/frag1.glsl default/frag10.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/inc_cp437.glsl default/inc_debug.glsl default/inc_functions.glsl default/inc_fx.glsl default/inc_magic.glsl default/inc_rand.glsl default/inc_res.glsl default/inc_sentences.glsl default/inc_src.glsl default/inc_template.glsl default/inc_time.glsl default/inc_yuv.glsl
|
EXTRA_DIST = default/forge_project.cfg default/frag1.glsl default/frag10.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/inc_cp437.glsl default/inc_debug.glsl default/inc_functions.glsl default/inc_fx.glsl default/inc_magic.glsl default/inc_rand.glsl default/inc_res.glsl default/inc_sentences.glsl default/inc_src.glsl default/inc_template.glsl default/inc_time.glsl default/inc_yuyv.glsl
|
||||||
confdir = $(prefix)/share/$(PACKAGE)
|
confdir = $(prefix)/share/$(PACKAGE)
|
||||||
conf_DATA = default/forge_project.cfg default/frag1.glsl default/frag10.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/inc_cp437.glsl default/inc_debug.glsl default/inc_functions.glsl default/inc_fx.glsl default/inc_magic.glsl default/inc_rand.glsl default/inc_res.glsl default/inc_sentences.glsl default/inc_src.glsl default/inc_template.glsl default/inc_time.glsl default/inc_yuv.glsl
|
conf_DATA = default/forge_project.cfg default/frag1.glsl default/frag10.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/inc_cp437.glsl default/inc_debug.glsl default/inc_functions.glsl default/inc_fx.glsl default/inc_magic.glsl default/inc_rand.glsl default/inc_res.glsl default/inc_sentences.glsl default/inc_src.glsl default/inc_template.glsl default/inc_time.glsl default/inc_yuyv.glsl
|
||||||
@@ -82,6 +82,7 @@ Here are some pointers if you want to customize your FORGE experience:
|
|||||||
- [My nanoKontrol2 is acting strange](#my-nanokontrol2-is-acting-strange)
|
- [My nanoKontrol2 is acting strange](#my-nanokontrol2-is-acting-strange)
|
||||||
- [How do I report a bug?](#how-do-i-report-a-bug)
|
- [How do I report a bug?](#how-do-i-report-a-bug)
|
||||||
- [Help I got low FPS on my video device](#help-i-got-low-fps-on-my-video-device)
|
- [Help I got low FPS on my video device](#help-i-got-low-fps-on-my-video-device)
|
||||||
|
- [My video feed got strange lines](#my-video-feed-got-strange-lines)
|
||||||
- [How do I change the default project built-in sentences?](#how-do-i-change-the-default-project-built-in-sentences)
|
- [How do I change the default project built-in sentences?](#how-do-i-change-the-default-project-built-in-sentences)
|
||||||
|
|
||||||
## What is FORGE ?
|
## What is FORGE ?
|
||||||
@@ -474,7 +475,17 @@ Don't forget to add all information available to your bug (version, operating sy
|
|||||||
|
|
||||||
### Help I got low FPS on my video device
|
### Help I got low FPS on my video device
|
||||||
|
|
||||||
There's already an [open issue](https://github.com/klemek/forge-steel/issues/1) on this subject.
|
Unfortunately, V4L2 is very slow compared to driver-specific decoding.
|
||||||
|
|
||||||
|
You can check your device real FPS on [V4L2 UCP](https://github.com/HedgeHawk/v4l2ucp) or [GTK UVC Viewer](https://github.com/jaswdr/guvcview).
|
||||||
|
|
||||||
|
Sadly, OpenEGL doesn't support double-buffered DMA buffers so FPS in FORGE may be halved.
|
||||||
|
|
||||||
|
### My video feed got strange lines
|
||||||
|
|
||||||
|
You need to decode the [V4L2 YUYV format](https://www.kernel.org/doc/html/v4.8/media/uapi/v4l/pixfmt-yuyv.html).
|
||||||
|
|
||||||
|
The code is available in the default project [default/inc_yuyv.glsl](./default/inc_yuyv.glsl)
|
||||||
|
|
||||||
### How do I change the default project built-in sentences?
|
### How do I change the default project built-in sentences?
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -8,7 +8,7 @@
|
|||||||
in vec2 vUV;
|
in vec2 vUV;
|
||||||
out vec4 fragColor;
|
out vec4 fragColor;
|
||||||
|
|
||||||
#include inc_yuv.glsl
|
#include inc_yuyv.glsl
|
||||||
|
|
||||||
uniform sampler2D iTex0;
|
uniform sampler2D iTex0;
|
||||||
uniform sampler2D iTex1;
|
uniform sampler2D iTex1;
|
||||||
@@ -18,6 +18,8 @@ uniform vec2 iInputResolution1;
|
|||||||
void main() {
|
void main() {
|
||||||
if (iInputFormat1 == YUYV_FOURCC) {
|
if (iInputFormat1 == YUYV_FOURCC) {
|
||||||
fragColor = yuyvTex(iTex1, vUV, int(iInputResolution1.x));
|
fragColor = yuyvTex(iTex1, vUV, int(iInputResolution1.x));
|
||||||
|
} else if (iInputResolution1.x > 0) {
|
||||||
|
fragColor = texture(iTex1, vUV);
|
||||||
} else {
|
} else {
|
||||||
fragColor = texture(iTex0, vUV);
|
fragColor = texture(iTex0, vUV);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -8,7 +8,7 @@
|
|||||||
in vec2 vUV;
|
in vec2 vUV;
|
||||||
out vec4 fragColor;
|
out vec4 fragColor;
|
||||||
|
|
||||||
#include inc_yuv.glsl
|
#include inc_yuyv.glsl
|
||||||
|
|
||||||
uniform sampler2D iTex0;
|
uniform sampler2D iTex0;
|
||||||
uniform sampler2D iTex2;
|
uniform sampler2D iTex2;
|
||||||
@@ -18,6 +18,8 @@ uniform vec2 iInputResolution2;
|
|||||||
void main() {
|
void main() {
|
||||||
if (iInputFormat2 == YUYV_FOURCC) {
|
if (iInputFormat2 == YUYV_FOURCC) {
|
||||||
fragColor = yuyvTex(iTex2, vUV, int(iInputResolution2.x));
|
fragColor = yuyvTex(iTex2, vUV, int(iInputResolution2.x));
|
||||||
|
} else if (iInputResolution2.x > 0) {
|
||||||
|
fragColor = texture(iTex2, vUV);
|
||||||
} else {
|
} else {
|
||||||
fragColor = texture(iTex0, vUV);
|
fragColor = texture(iTex0, vUV);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include inc_magic.glsl
|
#include inc_magic.glsl
|
||||||
#include inc_functions.glsl
|
#include inc_functions.glsl
|
||||||
#include inc_yuv.glsl
|
#include inc_yuyv.glsl
|
||||||
#include inc_cp437.glsl
|
#include inc_cp437.glsl
|
||||||
|
|
||||||
#ifndef INC_DEBUG
|
#ifndef INC_DEBUG
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#ifndef INC_YUV
|
#ifndef INC_YUYV
|
||||||
#define INC_YUV
|
#define INC_YUYV
|
||||||
|
|
||||||
const int YUYV_FOURCC = 1448695129;
|
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) {
|
vec4 yuyvTex(sampler2D tex, vec2 vUV, int base_width) {
|
||||||
float w = base_width - 1;
|
float w = base_width - 1;
|
||||||
@@ -22,7 +22,7 @@ vec4 yuyvTex(sampler2D tex, vec2 vUV, int base_width) {
|
|||||||
tV.y - 0.5
|
tV.y - 0.5
|
||||||
);
|
);
|
||||||
|
|
||||||
return vec4(yuv_to_rgb * yuv, 1.0);
|
return vec4(yuyv_to_rgb * yuv, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user