mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 11:40:14 +02:00
Fixed order of operations for -swizzle using 0, 1
This commit is contained in:
parent
fb8393ec8e
commit
b6aa25280b
@ -2028,10 +2028,10 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
for (size_t j = 0; j < w; ++j)
|
for (size_t j = 0; j < w; ++j)
|
||||||
{
|
{
|
||||||
XMVECTOR pixel1 = XMVectorSelect(inPixels[j], g_XMZero, zc);
|
XMVECTOR pixel = XMVectorPermute(inPixels[j], inPixels2[j],
|
||||||
pixel1 = XMVectorSelect(pixel1, g_XMOne, oc);
|
|
||||||
outPixels[j] = XMVectorPermute(pixel1, inPixels2[j],
|
|
||||||
permuteElements[0], permuteElements[1], permuteElements[2], permuteElements[3]);
|
permuteElements[0], permuteElements[1], permuteElements[2], permuteElements[3]);
|
||||||
|
pixel = XMVectorSelect(pixel, g_XMZero, zc);
|
||||||
|
outPixels[j] = XMVectorSelect(pixel, g_XMOne, oc);
|
||||||
}
|
}
|
||||||
}, result);
|
}, result);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
|
@ -2458,10 +2458,10 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
for (size_t j = 0; j < w; ++j)
|
for (size_t j = 0; j < w; ++j)
|
||||||
{
|
{
|
||||||
XMVECTOR pixel = XMVectorSelect(inPixels[j], g_XMZero, zc);
|
XMVECTOR pixel = XMVectorSwizzle(inPixels[j],
|
||||||
pixel = XMVectorSelect(pixel, g_XMOne, oc);
|
|
||||||
outPixels[j] = XMVectorSwizzle(pixel,
|
|
||||||
swizzleElements[0], swizzleElements[1], swizzleElements[2], swizzleElements[3]);
|
swizzleElements[0], swizzleElements[1], swizzleElements[2], swizzleElements[3]);
|
||||||
|
pixel = XMVectorSelect(pixel, g_XMZero, zc);
|
||||||
|
outPixels[j] = XMVectorSelect(pixel, g_XMOne, oc);
|
||||||
}
|
}
|
||||||
}, *timage);
|
}, *timage);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user