[4.2.x] Powerup.ColorMap no longer works

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

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: [4.2.x] Powerup.ColorMap no longer works

Re: [4.2.x] Powerup.ColorMap no longer works

by Rachael » Sat Jan 18, 2020 9:53 am

Looks good to me. I was probably going to do something similar to that but I hadn't gotten around to it.

Re: [4.2.x] Powerup.ColorMap no longer works

by _mental_ » Sat Jan 18, 2020 9:47 am

I reworked applying of customized invulnerability colormap in this PR. Testers and reviewers are welcome.

Re: [4.2.x] Powerup.ColorMap no longer works

by dpJudas » Sat Jan 18, 2020 7:17 am

The code I added just tries to what the hardware renderer does already.

That said, I don't understand why the colormap shader reduces it to a blend when it could have uploaded the special colormaps as textures and applied them as a LUT. Is it just how the code evolved historically or there a deeper reason?

Re: [4.2.x] Powerup.ColorMap no longer works

by _mental_ » Sat Jan 18, 2020 7:04 am

The problem is in loosing all colormaps (except five hardcoded) added with AddSpecialColormap(). At least, R_InitColormaps() cannot be used to apply custom invulnerability colors.

Re: [4.2.x] Powerup.ColorMap no longer works

by Rachael » Sat Jan 18, 2020 5:42 am

Looks like dpJudas snuck this in so now all that remains is for me trying to fix the custom colormaps, themselves... if I can find the code that activates them.

Re: [4.2.x] Powerup.ColorMap no longer works

by Rachael » Fri Jan 17, 2020 5:42 am

That's because it's not been done at all on SoftPoly. I was referring to OpenGL/Vulkan, there's more than one issue here.

Re: [4.2.x] Powerup.ColorMap no longer works

by Grizzly » Fri Jan 17, 2020 5:41 am

Rachael wrote:Okay, from my test, it appears that this problem only occurs if you turn the custom invulnerability colormap on. If you have it off from the very moment you start GZDoom, it does not appear to occur.
I can not confirm this. For me, running on softpoly, the Colormap simply doesn't work. This is on an installation that has never even touched the custom setting.

Re: [4.2.x] Powerup.ColorMap no longer works

by Rachael » Tue Jan 14, 2020 9:03 am

Okay, from my test, it appears that this problem only occurs if you turn the custom invulnerability colormap on. If you have it off from the very moment you start GZDoom, it does not appear to occur.

Re: [4.2.x] Powerup.ColorMap no longer works

by Major Cooke » Tue Jan 14, 2020 8:50 am

For the record, I took that picture while in OpenGL mode. But not when using Vulkan.

Re: [4.2.x] Powerup.ColorMap no longer works

by Graf Zahl » Tue Jan 14, 2020 4:13 am

I'm not sure if SSE2 is capable on operating on a byte target. The best course of action might be to create an 18 bit lookup table and then let 3 or 4 threads run over the image, translating each pixel. Doing such a uniform transformation ad-hoc per pixel may just be too slow.

Re: [4.2.x] Powerup.ColorMap no longer works

by Rachael » Tue Jan 14, 2020 3:57 am

This is probably a NYI thing in SoftPoly. Keep in mind the shader functions in SoftPoly are extremely time-sensitive - every new check or function you put in here will likely result in a FPS hit even when they are not active.

I think I could code in a colormap shader pretty easily, but I don't trust myself to be able to optimize it well, because I tend to favor code organization and moddability over speed. This probably needs dpJudas's SSE2 methods.

Re: [4.2.x] Powerup.ColorMap no longer works

by _mental_ » Tue Jan 14, 2020 3:34 am

Works fine using OpenGL and Vulkan.
Screenshot_Doom_20200114_110531.jpg
It works incorrectly with SoftPoly though.
colormap_softpoly.jpg

[4.2.x] Powerup.ColorMap no longer works

by Major Cooke » Mon Jan 13, 2020 11:59 am

Code: Select all

class InvS : PowerupGiver
{
	Default
	{
		+COUNTITEM
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		+INVENTORY.BIGPOWERUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerInvulnerable";
		Powerup.Colormap 0.0, 0.0, 0.0, 1.0, 1.0, 1.0;
		Inventory.PickupMessage "$GOTINVUL";
	}
	States
	{
	Spawn:
		PINV ABCD 6 Bright;
		Loop;
	}
}
"Give InvS" in console. You'll see no colormap is applied. This is most likely related to the InverseMap changes that were made.

Top