mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 12:23:51 +00:00
small corrections
This commit is contained in:
parent
9ab3a0c44b
commit
497b33e403
1 changed files with 4 additions and 4 deletions
|
@ -713,16 +713,16 @@ namespace MWRender
|
||||||
|
|
||||||
osg::Vec4 getColorByDirection(osg::Vec3d d)
|
osg::Vec4 getColorByDirection(osg::Vec3d d)
|
||||||
{
|
{
|
||||||
// for details see OpenGL 4.4 specification page 241
|
// for details see OpenGL 4.4 specification page 225
|
||||||
|
|
||||||
double x, y;
|
double x, y;
|
||||||
double ma;
|
double ma;
|
||||||
int side;
|
int side;
|
||||||
|
|
||||||
double ax, ay, az;
|
double ax, ay, az;
|
||||||
ax = d.x() > 0 ? d.x() : -d.x(); // abs behaves weirdly for some reason
|
ax = fabs(d.x());
|
||||||
ay = d.y() > 0 ? d.y() : -d.y();
|
ay = fabs(d.y());
|
||||||
az = d.z() > 0 ? d.z() : -d.z();
|
az = fabs(d.z());
|
||||||
|
|
||||||
if (ax > ay)
|
if (ax > ay)
|
||||||
if (ax > az)
|
if (ax > az)
|
||||||
|
|
Loading…
Reference in a new issue