Fix mirror sampling fixes issue 135.
This commit is contained in:
parent
e2ac16f100
commit
2ea2b40c72
|
@ -5,6 +5,7 @@ NVIDIA Texture Tools version 2.0.9
|
||||||
* Improve C# / .NET Wrapper
|
* Improve C# / .NET Wrapper
|
||||||
* Add an XNA Game Studio 3.1 Content Processor to make it easy to utilize NVIDIA Texture Tools in XNA applications.
|
* Add an XNA Game Studio 3.1 Content Processor to make it easy to utilize NVIDIA Texture Tools in XNA applications.
|
||||||
* Fix single color DXT1a compressor. Fixes issue 134.
|
* Fix single color DXT1a compressor. Fixes issue 134.
|
||||||
|
* Fix mirror sampling. Fixes issue 135.
|
||||||
|
|
||||||
NVIDIA Texture Tools version 2.0.8
|
NVIDIA Texture Tools version 2.0.8
|
||||||
* Fix float to fixed image conversion. Patch provided by Alex Pfaffe. Fixes issue 121.
|
* Fix float to fixed image conversion. Patch provided by Alex Pfaffe. Fixes issue 121.
|
||||||
|
|
|
@ -34,10 +34,13 @@ namespace
|
||||||
|
|
||||||
static int mirror(int x, int w)
|
static int mirror(int x, int w)
|
||||||
{
|
{
|
||||||
|
if (w == 1) return 0;
|
||||||
|
|
||||||
x = abs(x);
|
x = abs(x);
|
||||||
while (x >= w) {
|
while (x >= w) {
|
||||||
x = 2 * w - x - 2;
|
x = abs(w + w - x - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user