Skip to content

Commit 387b649

Browse files
committed
gfx: fix off-screen default position of the Text node
An unconfigured Text process rendered nothing: the UBO default position was {0.5,0.5} (TextNode.hpp), a clip-space offset added to the text quad in the vertex shader, which shoved the default text ~half a screen up+right — off the top edge — until Position was manually set. Default to {0,0} (screen centre). Found + verified by the text-render harness (untouched Text now renders 1508 visible px; the harness's default-visibility check is a hard assertion). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rZgzE8JjWvHDtaVUhxpLE
1 parent 89ab3ea commit 387b649

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/plugins/score-plugin-gfx/Gfx/Graph/TextNode.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ struct TextNode : NodeModel
2626
{
2727
float opacity{1.};
2828
float padding_std140_0{};
29-
float position[2]{0.5, 0.5};
29+
// Clip-space offset (added to the text quad in the vertex shader). {0,0} is
30+
// screen centre; the previous {0.5,0.5} default shifted an unconfigured Text
31+
// process ~half a screen up+right — off the top edge — so default text was
32+
// invisible until Position was touched. (video/text render validation)
33+
float position[2]{0.0, 0.0};
3034
float scale[2]{1., 1.};
3135
} ubo;
3236
#pragma pack(pop)

0 commit comments

Comments
 (0)