diff options
| author | Tony Wasserka <neobrainx@gmail.com> | 2014-06-21 12:17:26 +0200 |
|---|---|---|
| committer | Tony Wasserka <neobrainx@gmail.com> | 2014-06-21 12:17:26 +0200 |
| commit | fbca397c924e3906e9ab26ec3f967760385cc8d6 (patch) | |
| tree | b8c94b60ef5805ae0d36919d3183c6b122d59f36 /Source/Core/VideoBackends/Software/TransformUnit.cpp | |
| parent | ddadb4f29dc96b988a004bda43becb621fe2ac7d (diff) | |
| parent | 924ad1ee9ff7bfa19163082ca203961d65788253 (diff) | |
Merge pull request #439 from degasus/lighting-fix
Lighting cleanup
Diffstat (limited to 'Source/Core/VideoBackends/Software/TransformUnit.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/TransformUnit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/TransformUnit.cpp b/Source/Core/VideoBackends/Software/TransformUnit.cpp index 2c4c495087..f79c57be00 100644 --- a/Source/Core/VideoBackends/Software/TransformUnit.cpp +++ b/Source/Core/VideoBackends/Software/TransformUnit.cpp @@ -210,7 +210,7 @@ inline float SafeDivide(float n, float d) void LightColor(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChannel &chan, Vec3 &lightCol) { - const LightPointer *light = (const LightPointer*)&xfmem.lights[0x10*lightNum]; + const LightPointer *light = (const LightPointer*)&xfmem.lights[lightNum]; if (!(chan.attnfunc & 1)) { @@ -295,7 +295,7 @@ void LightColor(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChann void LightAlpha(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChannel &chan, float &lightCol) { - const LightPointer *light = (const LightPointer*)&xfmem.lights[0x10*lightNum]; + const LightPointer *light = (const LightPointer*)&xfmem.lights[lightNum]; if (!(chan.attnfunc & 1)) { @@ -476,7 +476,7 @@ void TransformTexCoord(const InputVertexData *src, OutputVertexData *dst, bool s break; case XF_TEXGEN_EMBOSS_MAP: { - const LightPointer *light = (const LightPointer*)&xfmem.lights[0x10*texinfo.embosslightshift]; + const LightPointer *light = (const LightPointer*)&xfmem.lights[texinfo.embosslightshift]; Vec3 ldir = (light->pos - dst->mvPosition).normalized(); float d1 = ldir * dst->normal[1]; |
