[ioquake3] 12/25: OpenGL2: Fix bug in generating normal maps for non-square textures.
Simon McVittie
smcv at debian.org
Sun Mar 12 18:23:25 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository ioquake3.
commit 294109628d87df8c151f956b4c6bbc3d2381ae39
Author: SmileTheory <SmileTheory at gmail.com>
Date: Mon Dec 12 15:33:54 2016 -0800
OpenGL2: Fix bug in generating normal maps for non-square textures.
---
code/renderergl2/tr_image.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/renderergl2/tr_image.c b/code/renderergl2/tr_image.c
index 4203833..0fa7961 100644
--- a/code/renderergl2/tr_image.c
+++ b/code/renderergl2/tr_image.c
@@ -502,11 +502,11 @@ static void RGBAtoNormal(const byte *in, byte *out, int width, int height, qbool
if (clampToEdge)
{
- src_x = CLAMP(src_x, 0, height - 1);
+ src_x = CLAMP(src_x, 0, width - 1);
}
else
{
- src_x = (src_x + height) % height;
+ src_x = (src_x + width) % width;
}
s[i++] = *(out + (src_y * width + src_x) * 4 + 3);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list