mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
OpenGL2: Fix bug in generating normal maps for non-square textures.
This commit is contained in:
parent
06b47ad2a9
commit
294109628d
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue