mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-14 08:30:49 +00:00
- Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as intended will not work. SVN r977 (trunk)
This commit is contained in:
parent
32557c4a28
commit
9fcb85d3e9
2 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
May 17, 2008 (Changes by Graf Zahl)
|
||||||
|
- Fixed: All translucent blending operations for CopyColors must treat an
|
||||||
|
alpha of 0 so that the pixel is not modified or texture composition as
|
||||||
|
intended will not work.
|
||||||
|
|
||||||
May 16, 2008
|
May 16, 2008
|
||||||
- Fixed: 3D hardware texture filling did not copy pixels with 0 alpha,
|
- Fixed: 3D hardware texture filling did not copy pixels with 0 alpha,
|
||||||
preserving whatever was underneath in the texture box previously.
|
preserving whatever was underneath in the texture box previously.
|
||||||
|
|
|
@ -312,42 +312,42 @@ struct bBlend
|
||||||
{
|
{
|
||||||
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (d*i->invalpha + s*i->alpha) >> FRACBITS; }
|
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (d*i->invalpha + s*i->alpha) >> FRACBITS; }
|
||||||
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
||||||
static __forceinline bool ProcessAlpha0() { return true; }
|
static __forceinline bool ProcessAlpha0() { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bAdd
|
struct bAdd
|
||||||
{
|
{
|
||||||
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MIN<int>((d*FRACUNIT + s*i->alpha) >> FRACBITS, 255); }
|
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MIN<int>((d*FRACUNIT + s*i->alpha) >> FRACBITS, 255); }
|
||||||
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
||||||
static __forceinline bool ProcessAlpha0() { return true; }
|
static __forceinline bool ProcessAlpha0() { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bSubtract
|
struct bSubtract
|
||||||
{
|
{
|
||||||
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MAX<int>((d*FRACUNIT - s*i->alpha) >> FRACBITS, 0); }
|
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MAX<int>((d*FRACUNIT - s*i->alpha) >> FRACBITS, 0); }
|
||||||
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
||||||
static __forceinline bool ProcessAlpha0() { return true; }
|
static __forceinline bool ProcessAlpha0() { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bReverseSubtract
|
struct bReverseSubtract
|
||||||
{
|
{
|
||||||
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MAX<int>((-d*FRACUNIT + s*i->alpha) >> FRACBITS, 0); }
|
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = MAX<int>((-d*FRACUNIT + s*i->alpha) >> FRACBITS, 0); }
|
||||||
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
||||||
static __forceinline bool ProcessAlpha0() { return true; }
|
static __forceinline bool ProcessAlpha0() { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bModulate
|
struct bModulate
|
||||||
{
|
{
|
||||||
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (s*d)/255; }
|
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (s*d)/255; }
|
||||||
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
||||||
static __forceinline bool ProcessAlpha0() { return true; }
|
static __forceinline bool ProcessAlpha0() { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bCopyAlpha
|
struct bCopyAlpha
|
||||||
{
|
{
|
||||||
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (s*a + d*(255-a))/255; }
|
static __forceinline void OpC(BYTE &d, BYTE s, BYTE a, FCopyInfo *i) { d = (s*a + d*(255-a))/255; }
|
||||||
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
static __forceinline void OpA(BYTE &d, BYTE s, FCopyInfo *i) { d = s; }
|
||||||
static __forceinline bool ProcessAlpha0() { return true; }
|
static __forceinline bool ProcessAlpha0() { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue