fix: adapt HorizontalBillboard vectors to right-hand coordinate system

Flip sideVector and upVector to match Galacean's right-hand coordinate
system while preserving face normal (+Y), texture orientation, and
rotation direction consistent with Unity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hhhhkrx
2026-03-23 15:53:52 +08:00
parent d6b4691be6
commit b69ab773c8

View File

@@ -1,7 +1,7 @@
#ifdef RENDERER_MODE_HORIZONTAL_BILLBOARD
vec2 corner = a_CornerTextureCoordinate.xy + renderer_PivotOffset.xy;
const vec3 sideVector = vec3(-1.0, 0.0, 0.0);
const vec3 upVector = vec3(0.0, 0.0, 1.0);
const vec3 sideVector = vec3(1.0, 0.0, 0.0);
const vec3 upVector = vec3(0.0, 0.0, -1.0);
corner *= computeParticleSizeBillboard(a_StartSize.xy, normalizedAge);
// HorizontalBillboard rotates in XZ plane (around Y-axis normal).