Option to disable inverted colormap

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Option to disable inverted colormap

Re: Option to disable inverted colormap

by Gez » Fri Oct 09, 2020 6:22 am

Graf Zahl wrote:These mods use a palette based map, but those do not work with hardware rendering and deriving a blend color from them is not trivial.
I think most real cases can be covered by looking at the whiteindex and blackindex colors.
  • If the blackindex color is lighter than the whiteindex color, it's an inverted ramp.
  • The lightest color (blackindex if inverted, whiteindex otherwise) gives you the "pure" blend color since it's applied to a white base.
It's when different color ranges get different blendings that this wouldn't be possible (e.g. a hue change) but I don't remember ever seeing that used. A hue change wouldn't affect black or white (since by definition they have 0% saturation, making them hue irrelevant) but could be detected by looking, for the vanilla Doom palette, at index 176 (pure red) and index 200 (pure blue). So more algorithmically, keeping track of the purest red, green, and blue values in the base palette and looking at if they have an approximately constant hue change in the invuln palette would solve that case, too.

Re: Option to disable inverted colormap

by Rachael » Thu Oct 08, 2020 8:54 pm

I think the best option is to put it in MAPINFO.

Re: Option to disable inverted colormap

by Graf Zahl » Thu Oct 08, 2020 4:37 pm

These mods use a palette based map, but those do not work with hardware rendering and deriving a blend color from them is not trivial.

Re: Option to disable inverted colormap

by Guest » Thu Oct 08, 2020 12:19 pm

Hello! I'm not sure if this is the right topic to bring this up, but it seems related so I figured I might as well. I've noticed that when the custom option is disabled, GZDoom always defaults to the classic inverted color map for the invulnerability filter regardless of the PWAD being played. I've seen playthroughs of Back to Saturn X and Eviternity in other source ports and know that they were designed with custom filters, the former using an inverted color map with a light blue tint and the latter providing a noninverted green filter. Is this something that the WAD designers would have to do specially to work with GZDoom, or is it an enhancement that would need to be made to GZDoom to recognize those PWAD-defined settings?

Re: Option to disable inverted colormap

by Rachael » Tue Jul 21, 2020 5:04 am

First, you need to upgrade to the latest version of GZDoom. I don't even know if LZDoom has this or not, if it does it would be in the latest version of that too.

Then, you will find the option in the menu under Options->Display Options:

Re: Option to disable inverted colormap

by Guest » Mon Jul 20, 2020 7:55 am

Ok I know that I can seen as an idiot but how to enable this feauture now? In config file i cannot find this CVar. Please help.

Re: Option to disable inverted colormap

by Rachael » Tue Nov 26, 2019 10:55 pm

Sure. I've been wanting this feature myself since a very long time.

Re: Option to disable inverted colormap

by Blue Shadow » Tue Nov 26, 2019 9:19 pm

Thanks for this.

Re: Option to disable inverted colormap

by Rachael » Tue Nov 26, 2019 6:46 am

Alright, squash-merged as a3741abbf then.

Re: Option to disable inverted colormap

by Rachael » Tue Nov 26, 2019 6:43 am

Are there any objections with me going ahead with the merge on this one?

Re: Option to disable inverted colormap

by Rachael » Fri Nov 15, 2019 6:23 am

Where is the parsing done? Isn't it already being called here?

Re: Option to disable inverted colormap

by Graf Zahl » Fri Nov 15, 2019 6:02 am

Only if you call it once with 'false' before parsing.

Re: Option to disable inverted colormap

by Rachael » Fri Nov 15, 2019 5:44 am

Will this work?

Re: Option to disable inverted colormap

by Graf Zahl » Fri Nov 15, 2019 5:22 am

During parsing of ZScript or DECORATE the first colormap must be the inverse one, even if the option is on.
Otherwise the color matching may fail.

Top