mirror of
https://github.com/galacean/engine.git
synced 2026-05-06 22:23:05 +08:00
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:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user