packed intersection and matrix
This commit is contained in:
parent
027947cae6
commit
f0becd1582
7 changed files with 948 additions and 557 deletions
|
|
@ -270,12 +270,12 @@ namespace Crafter {
|
|||
// R0 = up × R2 is linear in R2, so its normalized direction does
|
||||
// not depend on whether we hand R2 in before or after its own
|
||||
// normalize. Computing R0_raw from the un-normalized R2 lets us
|
||||
// satisfy the 4-input Normalize requirement with one batched call
|
||||
// (duplicating R2 and R0 in the padding slots).
|
||||
// satisfy the VectorF32<3,1>::BatchSize Normalize requirement with
|
||||
// one batched call (duplicating R2 and R0 in the padding slots).
|
||||
VectorF32<3, 1> R0Raw = VectorF32<3, 1>::Cross(upDirection, eyeDirection);
|
||||
auto normalized = VectorF32<3, 1>::Normalize(eyeDirection, R0Raw, eyeDirection, R0Raw);
|
||||
VectorF32<3, 1> R2 = std::get<0>(normalized);
|
||||
VectorF32<3, 1> R0 = std::get<1>(normalized);
|
||||
VectorF32<3, 1> R2 = normalized[0];
|
||||
VectorF32<3, 1> R0 = normalized[1];
|
||||
VectorF32<3, 1> R1 = VectorF32<3, 1>::Cross(R2, R0);
|
||||
VectorF32<3, 1> negEye = -eyePosition;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue