fix(of): mirror text + boing first
Bug critique : tous les textes apparaissaient en miroir vertical depuis l'introduction des transitions FBO. Cause : gl_FragCoord est bottom-left en GL alors que les FBO oF sont rendus top-left. Solution : flip Y dans les 3 shaders de transition (crossfade/dissolve/wipe). vec2 px = vec2(gl_FragCoord.x, uRes.y - gl_FragCoord.y); AMIGA TRIBUTE demo : BOING BALL maintenant en premier acte au lieu d'INSERT DISK, pour que l'utilisateur voie tout de suite la boule rouge/blanche emblematique du 1984 Amiga.
This commit is contained in:
@@ -9,7 +9,8 @@ uniform float uT; // 0..1 progression de la transition
|
||||
out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
vec2 px = gl_FragCoord.xy;
|
||||
// Y-flip : gl_FragCoord est bottom-left, FBO content est top-left.
|
||||
vec2 px = vec2(gl_FragCoord.x, uRes.y - gl_FragCoord.y);
|
||||
vec3 a = texture(uPrev, px).rgb;
|
||||
vec3 b = texture(uCur, px).rgb;
|
||||
fragColor = vec4(mix(a, b, uT), 1.0);
|
||||
|
||||
@@ -11,10 +11,9 @@ out vec4 fragColor;
|
||||
float hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
|
||||
|
||||
void main() {
|
||||
vec2 px = gl_FragCoord.xy;
|
||||
// Y-flip : gl_FragCoord est bottom-left, FBO content est top-left.
|
||||
vec2 px = vec2(gl_FragCoord.x, uRes.y - gl_FragCoord.y);
|
||||
float n = hash(floor(px / 6.0)); // bruit en blocs 6x6
|
||||
// Bordure dégradée : pixels avec hash < uT viennent de cur, autres de prev,
|
||||
// avec un fade doux autour du seuil pour pas un "step" agressif.
|
||||
float k = smoothstep(uT - 0.08, uT + 0.08, n);
|
||||
vec3 a = texture(uPrev, px).rgb;
|
||||
vec3 b = texture(uCur, px).rgb;
|
||||
|
||||
@@ -9,7 +9,8 @@ uniform float uT;
|
||||
out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
vec2 px = gl_FragCoord.xy;
|
||||
// Y-flip : gl_FragCoord est bottom-left, FBO content est top-left.
|
||||
vec2 px = vec2(gl_FragCoord.x, uRes.y - gl_FragCoord.y);
|
||||
vec2 uv = px / uRes;
|
||||
// Wipe radial depuis le centre. À uT=0 : tout uPrev. À uT=1 : tout uCur.
|
||||
float d = length(uv - 0.5) * 1.5; // 0 au centre, ~1 au coin
|
||||
|
||||
@@ -531,10 +531,15 @@ void ofApp::initDemos() {
|
||||
|
||||
// ─── 1 · AMIGA TRIBUTE ───────────────────────────────────
|
||||
demos_[0] = {"AMIGA TRIBUTE", {
|
||||
{"INSERT DISK", 15.0f, stars(), SS::Neon,
|
||||
{"BOING BALL", 30.0f, all(), SS::Bouncy,
|
||||
" *** BOING BALL *** JULY 1984 RJ MICAL DALE LUCK "
|
||||
" THE FIRST AMIGA DEMO 8 MERIDIANS RED AND WHITE "
|
||||
" GREETINGS TO COMMODORE-AMIGA INC ", "M",
|
||||
BgKind::BoingBall},
|
||||
{"INSERT DISK", 10.0f, stars(), SS::Neon,
|
||||
" *** AMIGA 500 RELOADED *** KICKSTART 1.3 "
|
||||
" INSERT WORKBENCH DISK ", "M", BgKind::Starfield},
|
||||
{"BOING BALL", 30.0f, all(), SS::Bouncy,
|
||||
{"BOING BALL 2", 25.0f, all(), SS::Bouncy,
|
||||
" *** BOING BALL *** JULY 1984 RJ MICAL DALE LUCK "
|
||||
" THE FIRST AMIGA DEMO 8 MERIDIANS RED AND WHITE "
|
||||
" GREETINGS TO COMMODORE-AMIGA INC ", "M",
|
||||
|
||||
Reference in New Issue
Block a user