better fps preview on debug view only
This commit is contained in:
+15
-1
@@ -4,12 +4,15 @@
|
||||
in vec2 vUV;
|
||||
out vec4 fragColor;
|
||||
|
||||
uniform int iInputFPS1;
|
||||
uniform int iInputFPS2;
|
||||
|
||||
float s(vec2 uv, float x0, float y0) {
|
||||
return step(x0, uv.x) * step(-x0 - 1, -uv.x) * step(y0, uv.y) *
|
||||
step(-y0 - 1, -uv.y);
|
||||
}
|
||||
|
||||
const int texts[8][5] = {
|
||||
const int texts[9][5] = {
|
||||
{0x49, 0x4E, 0x20, 0x41, 0x00}, // IN A
|
||||
{0x49, 0x4E, 0x20, 0x42, 0x00}, // IN B
|
||||
{0x53, 0x52, 0x43, 0x20, 0x41}, // SRC A
|
||||
@@ -18,6 +21,7 @@ const int texts[8][5] = {
|
||||
{0x46, 0x58, 0x20, 0x42, 0x00}, // FX B
|
||||
{0x41, 0x2B, 0x42, 0x00, 0x00}, // A+B
|
||||
{0x4D, 0x46, 0x58, 0x00, 0x00}, // MFX
|
||||
{0x46, 0x50, 0x53, 0x00, 0x00}, // FPS
|
||||
};
|
||||
|
||||
void main() {
|
||||
@@ -47,8 +51,18 @@ void main() {
|
||||
|
||||
f += rect(uv3, vec2(-51, 28.5), vec2(2.1, 0.7));
|
||||
t += write_5(uv3, vec2(-53,28), texts[0]);
|
||||
if (iInputResolution1.x > 0) {
|
||||
f += rect(uv3, vec2(-50.4, 26.5), vec2(2.8, 0.7));
|
||||
t += write_int(uv3, vec2(-53,26), iInputFPS1, 2);
|
||||
t += write_5(uv3, vec2(-50.5,26), texts[8]);
|
||||
}
|
||||
f += rect(uv3, vec2(-51, 8.5), vec2(2.1, 0.7));
|
||||
t += write_5(uv3, vec2(-53,8), texts[1]);
|
||||
if (iInputResolution2.x > 0) {
|
||||
f += rect(uv3, vec2(-50.4, 6.5), vec2(2.8, 0.7));
|
||||
t += write_int(uv3, vec2(-53,6), iInputFPS2, 2);
|
||||
t += write_5(uv3, vec2(-50.5,6), texts[8]);
|
||||
}
|
||||
f += rect(uv3, vec2(-14.5, 28.5), vec2(2.6, 0.7));
|
||||
t += write_5(uv3, vec2(-17,28), texts[2]);
|
||||
f += rect(uv3, vec2(-14.5, 8.5), vec2(2.6, 0.7));
|
||||
|
||||
Reference in New Issue
Block a user