From d13498ae62e032d1fc0f187dd7482a467883c9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= <108685187+electron-rare@users.noreply.github.com> Date: Thu, 7 May 2026 22:08:20 +0200 Subject: [PATCH] fix(of): disable FBO transition (mirror bug) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le pipeline FBO de transition causait un flip Y persistant des textes (FBO rendu top-left vs gl_FragCoord bottom-left en GL). Le flip Y dans les shaders corrigeait la transition mais pas le rendu courant. Solution simple : on bypass le FBO et on rend directement à l'écran via postfx comme avant. Les transitions visuelles sont assurées par le flash blanc 0.45s + le glitch RGB postfx 0.45s déclenchés sur enterScene(). Les 3 shaders transitions/*.frag restent dans le repo pour un futur fix architectural propre. 3 nouveaux modèles 3D intégrés aux narrations : - Demo 1 AMIGA : ajout PYRAMIDE acte 6 - Demo 3 ACID : ajout DNA HELIX + ROSACE après VORTEX --- oscope-of/src/ofApp.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/oscope-of/src/ofApp.cpp b/oscope-of/src/ofApp.cpp index 82f2f12..59f899d 100644 --- a/oscope-of/src/ofApp.cpp +++ b/oscope-of/src/ofApp.cpp @@ -565,9 +565,13 @@ void ofApp::initDemos() { " COPPER LIST IS POETRY EVERY SCANLINE A NEW COLOR " " GREETINGS TO SPACEBALLS AND ANARCHY ", "B", BgKind::Twister}, - {"VECTOR DEMO", 25.0f, all(), SS::Chrome, + {"VECTOR DEMO", 20.0f, all(), SS::Chrome, " VECTOR GRAPHICS BEFORE TEXTURES THERE WAS GEOMETRY ", "C", BgKind::VectorCubes}, + {"PYRAMIDE", 20.0f, polSpe(), SS::Chrome, + " PYRAMID OF MEMORY GIZA OF VECTORS " + " A 4-SIDED MONUMENT FROM 1986 ", "B", + BgKind::Pyramid}, }}; // ─── 2 · C64 LOWLIFE ───────────────────────────────────── @@ -609,9 +613,15 @@ void ofApp::initDemos() { " FULL ACID NEURONS DANCING REALITY MELTING " " THE FILTER OPENS THE FILTER CLOSES " " AND THE HEAVENS SQUELCH BACK ", "H", BgKind::Metaballs}, - {"VORTEX", 25.0f, all(), SS::Rainbow, + {"VORTEX", 20.0f, all(), SS::Rainbow, " DOWN THE SPIRAL YOUR EGO DISSOLVES " " GREETINGS TO MERCURY AND TBL ", "H", BgKind::Vortex}, + {"DNA HELIX", 25.0f, polSpe(), SS::Cascade, + " DOUBLE HELIX OF SOUND THE ACID IS IN OUR DNA " + " A T C G TURNED INTO A B Eb F# ", "D", BgKind::DNA}, + {"ROSACE", 20.0f, polSpe(), SS::Wavy3D, + " K=5 PETALS POLAR ROSE EACH PETAL A KICK ", "H", + BgKind::Rose3d}, {"COMEDOWN", 25.0f, starsWave(), SS::Mirror, " AND SOFTLY BACK TO EARTH " " THE 303 SLEEPS IN ITS CIRCUIT ", "J", BgKind::Caustics}, @@ -1305,11 +1315,9 @@ void ofApp::draw() { if (transitionT_ > 1.0f) transitionT_ = 1.0f; } - // 1) Render scene complète dans le FBO courant (pas directement à l'écran) - if (sceneFboReady_) { - sceneFbo_[sceneFboIdx_].begin(); - ofClear(0, 0, 0, 255); - } + // FBO transition désactivée : provoquait un flip Y des textes (FBO + // rendu top-left vs gl_FragCoord bottom-left). On garde flash + glitch + // postfx qui suffisent à marquer les changements de scène. if (postFxEnabled_) { postfx_.beginScene(); ofClear(0, 255); @@ -1320,12 +1328,6 @@ void ofApp::draw() { ofBackground(0); drawMode(mode_, 0, 0, W, H); } - if (sceneFboReady_) { - sceneFbo_[sceneFboIdx_].end(); - // Composite : si transition en cours, blend prev↔cur via shader ; - // sinon dessine simplement le FBO courant à l'écran. - drawTransitionComposite(W, H); - } if (showGui_) { gui_.draw();