Fix a couple comments about coordinate handedness
This commit is contained in:
@@ -1073,9 +1073,9 @@ static aluMatrixf GetTransformFromVector(const ALfloat *vec)
|
||||
/* Normalize the panning vector according to the N3D scale, which has an
|
||||
* extra sqrt(3) term on the directional components. Converting from OpenAL
|
||||
* to B-Format also requires negating X (ACN 1) and Z (ACN 3). Note however
|
||||
* that the reverb panning vectors use right-handed coordinates, unlike the
|
||||
* rest of OpenAL which use left-handed. This is fixed by negating Z, which
|
||||
* cancels out with the B-Format Z negation.
|
||||
* that the reverb panning vectors use left-handed coordinates, unlike the
|
||||
* rest of OpenAL which use right-handed. This is fixed by negating Z,
|
||||
* which cancels out with the B-Format Z negation.
|
||||
*/
|
||||
mag = sqrtf(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);
|
||||
if(mag > 1.0f)
|
||||
|
||||
@@ -281,7 +281,7 @@ static void UpdateListenerAndEffects(float timediff, const ALuint slots[2], cons
|
||||
|
||||
/* Calculate local_dir, which represents the listener-relative point to the
|
||||
* adjacent zone (should also include orientation). Because EAX Reverb uses
|
||||
* right-handed coordinates instead of left-handed like the rest of OpenAL,
|
||||
* left-handed coordinates instead of right-handed like the rest of OpenAL,
|
||||
* negate Z for the local values.
|
||||
*/
|
||||
local_dir[0] = portal_pos[0] - listener_pos[0];
|
||||
|
||||
Reference in New Issue
Block a user