Skip to content

Commit

Permalink
Fix an incorrect transform in directional billboard.
Browse files Browse the repository at this point in the history
  • Loading branch information
ueshita committed Mar 27, 2024
1 parent 96d747a commit 7292044
Show file tree
Hide file tree
Showing 9 changed files with 1,415 additions and 1,489 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ void CalcBillboard(::Effekseer::BillboardType billboardType,

F = frontDir;
R = ::Effekseer::SIMD::Vec3f::Cross(U, F).GetNormal();
U = ::Effekseer::SIMD::Vec3f::Cross(F, R).GetNormal();
R = ::Effekseer::SIMD::Vec3f::Cross(U, F).GetNormal();
F = ::Effekseer::SIMD::Vec3f::Cross(R, U).GetNormal();
}

dst.X = {R.GetX(), U.GetX(), F.GetX(), t.GetX()};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ void transformSprite(ParticleData particle, inout float3 position)
U = normalize(UnpackNormalizedFloat3(particle.Direction));
F = constants.CameraFront;
R = normalize(cross(U, F));
U = normalize(cross(F, R));
R = normalize(cross(U, F));
F = normalize(cross(R, U));
position = mul(position, float3x3(R, U, F));
}
else if (paramData.ShapeData == 2) {
Expand Down
Loading

0 comments on commit 7292044

Please sign in to comment.