2.0.03 Grey DECALS don't show with custom palette.

Bugs that have been resolved.

Moderator: Graf Zahl

User avatar
Enjay
Developer
Developer
Posts: 4753
Joined: Tue Aug 30, 2005 23:19
Location: Scotland

2.0.03 Grey DECALS don't show with custom palette.

Post by Enjay »

Bit of an odd one here. With the attached palette (which I have been using for years), greyscale decals do not seem to show. Coloured ones do (red blood, green flash on the BFG scorch, blue plasma burn) but the grey bits (bullet chips, underlying scorch on the BFG decal, etc etc) do not.

I don't see anything obviously weird about the palette and (like I said) it has worked for me for a very long time but some other custom palettes still work. I tried with ZDoom and it still works.

Image

Image

I'm not sure when the problem appeared but it's in 2.0.03 and the current Git code.

[edit] gzdoom-bin-1-8-07.zip works [/edit]
You do not have the required permissions to view the files attached to this post.
User avatar
Enjay
Developer
Developer
Posts: 4753
Joined: Tue Aug 30, 2005 23:19
Location: Scotland

Re: 2.0.03 Grey DECALS don't show with custom palette.

Post by Enjay »

It seems as if the first entry in the palette is somehow related. In the test palette, entry 0 is 0,0,0. If I change that (even slightly to 1,0,0) then decals come back. However, I don't know why this should be the case because other palettes, including the Doom default, have entry 0 as 0,0,0 and they work. :?

[edit]
OK, a bit more. Messing around with the default Doom palette, I found that if I change some of the other entries in the palette, I can affect the decals too. As you know, there are a multiple entries that are either 0,0,0 or 255,255,255 in the palette. Messing with these can affect how the grey decals show. e.g. changing the last black (the one at the end of the blue range) to 1,0,0 makes decals a little bit more translucent. Changing all the whites except the first one to colours that kind of match the range they are in (e.g. the one beside the reds was tested at 255, 250, 250) the grey decals were still there but they were so translucent they could hardly be seen.

So, my guess is that, somehow, GZDoom is using the extremes in the palette as some sort of reference for the extremes of greyscaling for the decals and when some of these entries are changed, the opacity of decals is affected.
[/edit]
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: 2.0.03 Grey DECALS don't show with custom palette.

Post by Graf Zahl »

Don't you just like ZDoom's messed up palette code?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: 2.0.03 Grey DECALS don't show with custom palette.

Post by Graf Zahl »

fixed. Fortunately it was something trival: When I added alpha support for the object color (used by shaded decals and particles) I forgot to set the proper alpha value for the decals - and in that part of the value the software renderer stores its palette index, so depending on what color was chosen for black it became randomly translucent.
User avatar
Enjay
Developer
Developer
Posts: 4753
Joined: Tue Aug 30, 2005 23:19
Location: Scotland

Re: 2.0.03 Grey DECALS don't show with custom palette.

Post by Enjay »

Thank you for the fix and the explanation. :)

Return to “Closed Bugs”