mayingzhen / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

The FloatImage::applyKernel() function in Filter.cpp used by createNormalMap() contains a bug. #158

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The kernelOffset:
const int kernelOffset = int(kernelWindow / 2) - 1;
should be:
const int kernelOffset = int(kernelWindow / 2);

O.w. a kernelwindow of width 3 will sample from 0 to +2 instead of from -1 to 
+1.

The same bug exist in
applyKernelVertical(const Kernel1*
and
applyKernelHorizontal(const Kernel1*

Original issue reported on code.google.com by tis...@gmail.com on 16 Jan 2011 at 7:18

GoogleCodeExporter commented 8 years ago
Hmm... at first glance it looks like you are right. I was surprised at first, 
but this code is actually not used much (the resizing code uses the polyphase 
filters instead), so this is only employed by the normal map conversion, which 
I almost never use.

Original comment by cast...@gmail.com on 18 Jan 2011 at 2:06

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1224.

Original comment by cast...@gmail.com on 19 Jan 2011 at 7:12