diff --git a/src/texture.cpp b/src/texture.cpp index 4c16edb02..1b769bb19 100644 --- a/src/texture.cpp +++ b/src/texture.cpp @@ -316,10 +316,8 @@ void CTexture::normalMap(float scale, bool wrap) float rmag = 1.0f / mag; int n = (i * width + j) * 4; - // npixels[n] = (unsigned char) (128 + 127 * dy * rmag); - // npixels[n + 1] = (unsigned char) (128 - 127 * dx * rmag); - npixels[n] = (unsigned char) (128 - 127 * dx * rmag); - npixels[n + 1] = (unsigned char) (128 + 127 * dy * rmag); + npixels[n] = (unsigned char) (128 + 127 * dy * rmag); + npixels[n + 1] = (unsigned char) (128 - 127 * dx * rmag); npixels[n + 2] = (unsigned char) (128 + 127 * rmag); npixels[n + 3] = 255; }