Bug: Player sprite translation still palette restricted in true colour renderer

Moderators: Rachael, dpJudas

Locked
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Bug: Player sprite translation still palette restricted in true colour renderer

Post by Nash » Fri Oct 14, 2016 4:45

For the true colour software renderer, the Player sprite's translation is still restricted to the limited palette colours. For example, if I try to make a cyan Doomguy (R: 0, G: 255, B: 255), the world sprite just gets butchered by the Doom palette.

In the Player menu, it looks correct. Only the world sprite looks wrong.

In OpenGL, everything looks good (same as GZDoom)

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Bug: Player sprite translation still palette restricted in true colour renderer

Post by dpJudas » Fri Oct 14, 2016 5:54

This is currently working as intended (well, as coded :p). I did have the impression that GZDoom was doing it the same way with translation, but maybe GZDoom handles the player sprite differently - I'm not sure.

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Bug: Player sprite translation still palette restricted in true colour renderer

Post by Graf Zahl » Fri Oct 14, 2016 8:44

Actually, translations contain a full RGB palette for the translated colors. GZDoom of course uses this to translate in-game textures, as does the 2D interface in ZDoom.
In fact I went to great lengths to make this work well, that's why FHardwareTexture contains such explicit translation support.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Bug: Player sprite translation still palette restricted in true colour renderer

Post by dpJudas » Fri Oct 14, 2016 10:59

Hmm, that's very interesting. The current code picking the translation in the swrenderer looks like this:

Code: Select all

		FRemapTable *table = TranslationToTable(translation);
		if (table != NULL && !table->Inactive)
		{
			dc_translation = table->Remap;
		}
If I understand you correctly, if it used FRemapTable's Palette instead of Remap it would get the full palette?

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Bug: Player sprite translation still palette restricted in true colour renderer

Post by dpJudas » Fri Oct 14, 2016 11:12

Seems the answer to that question is yes. Thanks for the tip, Graf! Now that was an easy change. :)

Locked

Return to “Closed Bugs”

Who is online

Users browsing this forum: No registered users and 1 guest