Blue shadow

Moderators: Rachael, dpJudas

Locked
Blue Shadow
Global Moderator
Global Moderator
Posts: 308
Joined: Sun Aug 29, 2010 6:09

Blue shadow

Post by Blue Shadow »

(Sorry. I couldn't resist!)

Tested with: 0.2pre-30-g9cf9cc1 (64-bit)
Specs:
  • Windows 10 Home Single Language 64-bit (10.0, Build 14393)
  • Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz (8 CPUs), ~2.4GHz
  • AMD Radeon HD 7600M Series
Using the true color renderer, the Shadow renderstyle appears blue instead of black. You can test this on spectres by setting the fuzz effect to "Shadow" from the Display Options menu.
blue_spectres.png
blue_spectres.png (283.5 KiB) Viewed 3541 times
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: Blue shadow

Post by Rachael »

You really weren't kidding with that title...

I'll look into this, but I haven't seen it before. Would you mind posting your config?

Also, your startup log as well - (same as it is for GZDoom, just +logfile startuplog.txt).
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Blue shadow

Post by dpJudas »

Pinky got the blues. :)
Blue Shadow
Global Moderator
Global Moderator
Posts: 308
Joined: Sun Aug 29, 2010 6:09

Re: Blue shadow

Post by Blue Shadow »

Both the config and startup log are here:
qzdoom_config.zip
(6.3 KiB) Downloaded 81 times
I also tested it with a fresh ini while keeping default engine settings - I get the same thing.
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: Blue shadow

Post by Rachael »

Hmm - another Ivybridge problem - but this one's not crashing.

I'm starting to think LLVM doesn't know what the hell to do with that CPU. Perhaps a directive should be put in place to force LLVM to compile for an older CPU?

While we're on the subject - what does QZDoom do when you view other transparent effects? I'm particularly interested in GZDoom-type maps, like Stronghold's MAP99.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Blue shadow

Post by dpJudas »

The ivybridge crash on this forum actually crashed before reaching the LLVM part (he quoted a crash in DrawColumnHorizRGBACommand, which is plain C++).

Adding a directive that can override the target CPU should be easy - we just need some way to specify a custom string to https://github.com/raa-eruanna/qzdoom/b ... s.cpp#L480.

I really hate that I had to add that vectored exception handler because it makes it write drawer errors for 9 out of 10 ZDoom rendering bugs. Usually ZDoom calculates some garbage, then the drawer dies trying to do as instructed. Even though I did add some checks, not all cases are covered because ZDoom loves to pass around pointers. Checking if a pointer is valid and in the right range is a bit tricky when its a texture source.

On the subject of the blue pinky, what's probably going on is that somehow something got alpha in the blue channel. What happens is that ZDoom's renderer picks a rendering style (drawer function). Let's say in this case it picked a solid fill of some sort. That makes ZDoom call R_FillAddColumn_rgba via a call to colfunc.

That function then creates a FillColumnAddLLVMCommand, which inherits from DrawColumnLLVMCommand. The constructor of DrawColumnLLVMCommand copies the solid color to fill with from dc_srccolor_bgra into a srccolor field in the DrawColumnArgs structure. That structure contains all the data passed on to the codegen'ed drawer. For the fill column version, that means it eventually ends up in DrawColumnCodegen::ProcessPixel with DrawColumnVariant::FillAdd:

Code: Select all

SSAVec4i DrawColumnCodegen::ProcessPixel(SSAInt sample_index, SSAVec4i bgcolor, DrawColumnVariant variant, bool isSimpleShade)
{
	SSAInt alpha, inv_alpha;
	switch (variant)
	{
	...
	case DrawColumnVariant::FillAdd:
		alpha = srccolor[3];
		alpha = alpha + (alpha >> 7);
		inv_alpha = 256 - alpha;
		return blend_add(srccolor, bgcolor, alpha, inv_alpha);
	...
	}
}

SSAVec4i DrawerCodegen::blend_add(SSAVec4i fg, SSAVec4i bg, SSAInt srcalpha, SSAInt destalpha)
{
	SSAVec4i color = (fg * srcalpha + bg * destalpha) / 256;
	return color.insert(3, 255);
}
So in this case we can see a that it does a normal alpha blend using both color and alpha from the dc_srccolor_bgra variable. Note that in this case, it is probably not using FillAdd for the blue pinkies, unless dc_srccolor_bgra is not being assigned at all and happens to have a left-over blue color in it.

Okay, that was a long description. Hopefully I didn't skip over too many parts or scare you with this. Understanding the full codegen part in one go can be a bit daunting. :)
Blue Shadow
Global Moderator
Global Moderator
Posts: 308
Joined: Sun Aug 29, 2010 6:09

Re: Blue shadow

Post by Blue Shadow »

Eruanna wrote:While we're on the subject - what does QZDoom do when you view other transparent effects? I'm particularly interested in GZDoom-type maps, like Stronghold's MAP99.
I don't seem to be having transparency issues. I ran through that map. Nothing looked out of the ordinary except for one thing: the sky/skybox (it's not rendering). But that's a different issue entirely.

And back to the spectre; the other fuzz effects (fuzz and translucent) work fine.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Blue shadow

Post by dpJudas »

Fixed pinkie having the blues.
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: Blue shadow

Post by Rachael »

Can't ... resist .... :mrgreen:
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Blue shadow

Post by dpJudas »

With a song like that pinkie might get the blues again! :)
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: Blue shadow

Post by Rachael »

Oh, now we have to intentionally recreate the effect. >_> After all that time you spent fixing it!

Well, stencil mode is possible in ZDoom, but I don't know if you can make it transparent or not. However, you can make it additive, which is enough :P
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Blue shadow

Post by dpJudas »

a mod where eiffel 65 plays each time you see a blue pinkie! Not sure if it would be classified as a terrywad tho :D
User avatar
Tiger
Developer
Developer
Posts: 861
Joined: Thu Feb 25, 2010 3:44
Location: United States
Contact:

Re: Blue shadow

Post by Tiger »

dpJudas wrote:Fixed pinkie having the blues.
NOOOOOOOOOOOOO!!!!! The best feature - gone for ever, this is truly a depressing day for us all.... :cry:
Nicholas 'Tiger' Gautier
User avatar
Rachael
Developer
Developer
Posts: 3639
Joined: Sat May 13, 2006 10:30

Re: Blue shadow

Post by Rachael »

No. Never gone.

Bonus: It works in GZDoom!
Attachments
bluepinky.pk3
(366 Bytes) Downloaded 185 times
User avatar
Tiger
Developer
Developer
Posts: 861
Joined: Thu Feb 25, 2010 3:44
Location: United States
Contact:

Re: Blue shadow

Post by Tiger »

Best feature - ever! :D
Nicholas 'Tiger' Gautier
Locked

Return to “Closed Bugs”