fix shader uniforms: std140 alignment, vec4 resolution, pad float

This commit is contained in:
Damocles 2026-04-13 09:56:34 +02:00
parent 51ef4c9fb3
commit e5861aa18f
2 changed files with 9 additions and 14 deletions

View file

@ -31,10 +31,11 @@ PanelWindow {
anchors.fill: parent
fragmentShader: Qt.resolvedUrl("hex_wave.frag.qsb")
// Uniforms
property size uResolution: Qt.size(width, height)
// Uniforms order must match shader std140 layout
property real uSize: 50.0
property real uWavePhase: -200
property real _pad0: 0
property vector4d uResolution: Qt.vector4d(width, height, 0, 0)
property color uC0: M.Theme.base0C
property color uC1: M.Theme.base0E
property color uC2: M.Theme.base09