mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-15 22:40:14 +02:00
Fixed bug in CalculateAlphaCoverage
This commit is contained in:
parent
1c20d528d4
commit
9b01346eeb
@ -260,10 +260,17 @@ namespace
|
||||
for (size_t x = 0; x < srcImage.width - 1; ++x)
|
||||
{
|
||||
// [0]=(x+0, y+0), [1]=(x+0, y+1), [2]=(x+1, y+0), [3]=(x+1, y+1)
|
||||
XMVECTOR v1 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(*pRow0), scale));
|
||||
const XMVECTOR v2 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(*pRow1), scale));
|
||||
XMVECTOR v3 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(*(pRow0++)), scale));
|
||||
const XMVECTOR v4 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(*(pRow1++)), scale));
|
||||
XMVECTOR r0 = XMVectorSplatW(*pRow0);
|
||||
XMVECTOR r1 = XMVectorSplatW(*pRow1);
|
||||
|
||||
XMVECTOR v1 = XMVectorSaturate(XMVectorMultiply(r0, scale));
|
||||
XMVECTOR v2 = XMVectorSaturate(XMVectorMultiply(r1, scale));
|
||||
|
||||
r0 = XMVectorSplatW(*(++pRow0));
|
||||
r1 = XMVectorSplatW(*(++pRow1));
|
||||
|
||||
XMVECTOR v3 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(r0), scale));
|
||||
XMVECTOR v4 = XMVectorSaturate(XMVectorMultiply(XMVectorSplatW(r1), scale));
|
||||
|
||||
v1 = XMVectorMergeXY(v1, v2); // [v1.x v2.x --- ---]
|
||||
v3 = XMVectorMergeXY(v3, v4); // [v3.x v4.x --- ---]
|
||||
|
Loading…
x
Reference in New Issue
Block a user