Weiter am Menü und an der Vollbildproblematik gearbeitet

This commit is contained in:
2026-07-12 22:27:22 +02:00
parent f109241e1f
commit 6cf8f52faf
41 changed files with 1848 additions and 748 deletions

View File

@@ -30,10 +30,15 @@ void main() {
float sway = sin(t * 2.1 + worldXZ.x * 0.08 + worldXZ.y * 0.06) * 0.6
+ sin(t * 1.4 - worldXZ.x * 0.05 + worldXZ.y * 0.09) * 0.4;
// Mindest-Stärke damit bei wenig Wind noch Bewegung sichtbar ist
float effectiveStrength = max(m_WindStrength, 0.05);
// Quadratische Gewichtung: Spitze bewegt sich mehr als Basis
float bend = sway * m_WindStrength * inTexCoord.y * inTexCoord.y;
float bend = sway * effectiveStrength * inTexCoord.y * inTexCoord.y;
pos.x += bend;
pos.z += bend * 0.3;
// Y-Kompression: Halm neigt sich statt zu strecken → verhindert visuelles Breiterwerden
pos.y -= bend * bend * 0.5;
}
texCoord = inTexCoord;

View File

@@ -34,10 +34,15 @@ void main() {
float sway = sin(t * 2.1 + wavePhase * 0.10 + randPhase) * 0.6
+ sin(t * 1.4 + wavePhase * 0.06 + randPhase * 0.73) * 0.4;
// Mindest-Stärke damit bei wenig Wind noch Bewegung sichtbar ist
float effectiveStrength = max(m_WindStrength, 0.05);
// Quadratische Gewichtung: Spitze biegt sich mehr als Basis
float bend = sway * m_WindStrength * wf * wf;
float bend = sway * effectiveStrength * wf * wf;
pos.x += windN.x * bend;
pos.z += windN.y * bend;
// Y-Kompression: Halm neigt sich statt zu strecken → verhindert visuelles Breiterwerden
pos.y -= bend * bend * 0.5;
}
varColor = inColor;