mirror of
https://github.com/microsoft/DirectXTex
synced 2025-01-03 23:11:05 +00:00
DirectXTex: Fixed slight image shift in custom Cubic filtering
This commit is contained in:
parent
98699f90f9
commit
7c5c9addf8
@ -173,7 +173,7 @@ inline void _CreateCubicFilter( _In_ size_t source, _In_ size_t dest, _In_ bool
|
||||
|
||||
for( size_t u = 0; u < dest; ++u )
|
||||
{
|
||||
float srcB = ( float(u) + 0.5f ) * scale + 0.5f;
|
||||
float srcB = ( float(u) + 0.5f ) * scale - 0.5f;
|
||||
|
||||
ptrdiff_t isrcB = bounduvw( ptrdiff_t(srcB), source - 1, wrap, mirror );
|
||||
ptrdiff_t isrcA = bounduvw( isrcB - 1, source - 1, wrap, mirror );
|
||||
@ -191,7 +191,6 @@ inline void _CreateCubicFilter( _In_ size_t source, _In_ size_t dest, _In_ bool
|
||||
}
|
||||
}
|
||||
|
||||
// Bicubic B-Spline
|
||||
#define CUBIC_INTERPOLATE( res, dx, p0, p1, p2, p3 ) \
|
||||
{ \
|
||||
XMVECTOR a0 = (p1); \
|
||||
|
Loading…
Reference in New Issue
Block a user