Page 1 of 1

[r1432] Patch blend alpha inconsistency

Posted: Fri Aug 03, 2012 0:24
by MaxED
Looks like alpha value of a Blend effect applied to TEXTURES path is inverted compared to ZDoom. Here are some examples:

Using this TEXTURES definition:

Code: Select all

Texture ATEX, 256, 256
{
	XScale 2.0
	YScale 2.0
	Patch ATEX, 0, 0
	{
		Blend "#00FF00", 0.1
	}
}
GZDoom:
Image
ZDoom:
Image


And using this TEXTURES definition:

Code: Select all

Texture ATEX, 256, 256
{
	XScale 2.0
	YScale 2.0
	Patch ATEX, 0, 0
	{
		Blend "#00FF00", 0.9
	}
}
GZDoom:
Image
ZDoom:
Image

Re: [r1432] Patch blend alpha inconsistency

Posted: Fri Aug 03, 2012 10:13
by Gez
Mmmh... What happens if you display that texture with DirectX by making it a full-screen graphics or a HUD weapon sprite?

Re: [r1432] Patch blend alpha inconsistency

Posted: Fri Aug 03, 2012 11:52
by MaxED
Fullscreen graphics seem to be consistent. Here I replaced HELP graphic with this:

Code: Select all

Graphic HELP, 320, 240
{
	Patch ATEX, 0, 0
	{
		Blend "#50E94B", 0.9
	}
}
Image
Image

Re: [r1432] Patch blend alpha inconsistency

Posted: Fri Aug 03, 2012 13:41
by Gez
As I thought. The texture manager is common to both (contrarily to the renderer), so it's the same logic that is used for compositing. The discrepancy is actually in the truecolor-to-paletted conversion code, so it's a ZDoom bug.

Re: [r1432] Patch blend alpha inconsistency

Posted: Fri Aug 03, 2012 14:06
by MaxED
I don't know the way (G)Zdoom's patch compositing logic works, but when I used one of Doom 2's patches (SLIME11), the problem was still there:

Code: Select all

Texture ATEX, 64, 64
{
	Patch SLIME11, 0, 0
	{
		Blend "#50E94B", 0.9
	}
}
Image
Image

Re: [r1432] Patch blend alpha inconsistency

Posted: Fri Aug 03, 2012 14:56
by Gez
I tell you, it's a ZDoom bug, not a GZDoom one. If ZDoom's renderer was in truecolor it would behave like GZDoom. There is no difference in the way the textures themselves are composited, the only discrepancy is in the way a blended texture get converted to paletted colors.

Re: [r1432] Patch blend alpha inconsistency

Posted: Fri Aug 03, 2012 15:11
by MaxED
OK. Should I repost this at zdoom.org (or perhaps you can do it, because you have better understanding about what's going wrong here)?

Re: [r1432] Patch blend alpha inconsistency

Posted: Fri Aug 03, 2012 15:29
by Gez
"Moved" to ZDoom, so closing this as duplicate.