mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 04:05:53 +01:00
Fixed a partable C dithering option, fixing the red artific on shadows for some configurations
This commit is contained in:
parent
dce391583c
commit
360d19b01c
|
@ -882,7 +882,7 @@ nextRowO:
|
||||||
#else
|
#else
|
||||||
union uConv
|
union uConv
|
||||||
{
|
{
|
||||||
ULONG val;
|
__int64 val;
|
||||||
DWORD dwords[2];
|
DWORD dwords[2];
|
||||||
UWORD words[4];
|
UWORD words[4];
|
||||||
WORD iwords[4];
|
WORD iwords[4];
|
||||||
|
@ -891,7 +891,8 @@ nextRowO:
|
||||||
for (int i=0; i<pixHeight; i++) {
|
for (int i=0; i<pixHeight; i++) {
|
||||||
int idx = i&3;
|
int idx = i&3;
|
||||||
uConv dith;
|
uConv dith;
|
||||||
dith.val = pulDitherTable[idx];
|
dith.dwords[0] = pulDitherTable[idx];
|
||||||
|
dith.dwords[1] = pulDitherTable[idx+1];
|
||||||
for (int j=0; j<4; j++) { dith.words[j] >>= mmShifter; }
|
for (int j=0; j<4; j++) { dith.words[j] >>= mmShifter; }
|
||||||
dith.val &= mmMask;
|
dith.val &= mmMask;
|
||||||
uConv* src = (uConv*)(pulSrc+i*pixWidth);
|
uConv* src = (uConv*)(pulSrc+i*pixWidth);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user