[g3.4pre-197-g0affc119f]Additive mid-textures break fog

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

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 Reply
User avatar
Xane123
Posts: 165
Joined: Tue Nov 24, 2015 1:58 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Inwood, WV
Contact:

[g3.4pre-197-g0affc119f]Additive mid-textures break fog

Post by Xane123 »

I was developing my game recently and noticed some walls looked too dark, like buildings under glass windows and the lower half of one building I made which had liquid behind glass above it. Downloading the latest GZDoom from DRD Team (g3.4pre-197-g0affc119f) revealed the bug is still there, so I made a demonstration WAD. Run that with Doom II as the IWAD and you'll be presented with two crates and two SHAWN2-parts lowered from the ceiling.
bug_brokenfog.wad
WAD demonstrating bug.
(7.65 KiB) Downloaded 23 times
• The first crate has a MIDBARS texture with normal rendering, which leaves the red tint correctly on the crate below it.
• The second crate is the same but has additive rendering on the mid-texture, which makes it use the default black fog for some reason.
• The two ceiling ones to their right are there to show that the additive mid-texture doesn't glitch lowered ceilings, only raised floors.
• I've also noticed that if a sidedef if affected by this glitch, any materials like specular/normal don't appear.
Screenshot showing materials not working; Left is an upper linedef, right is a lower linedef under additive glass.
Screenshot showing materials not working; Left is an upper linedef, right is a lower linedef under additive glass.
EDIT: Whoops, forgot to put this in the OpenGL bugs forum, but maybe the bug exists in the software renderer too...?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [g3.4pre-197-g0affc119f]Additive mid-textures break fog

Post by Graf Zahl »

The reason why this happens is quite simple: To render additive stuff with fog, the fog color needs to be disabled, and that didn't get reset when the lower parts got done.
User avatar
Xane123
Posts: 165
Joined: Tue Nov 24, 2015 1:58 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Inwood, WV
Contact:

Re: [g3.4pre-197-g0affc119f]Additive mid-textures break fog

Post by Xane123 »

Ah, that was a quick fix! Now those areas in my game look correct, but I've noticed a TEXTURES texture with a blended transparent image within it now lets me see through walls below the additive mid-texture, but this is a problem that happens with anything transparent, like 3D floors and reflective floors. I'll have to come up with a test WAD for this somehow (as it uses graphics from my game, which don't use Doom's palette) then start a new bug report on this glitchy texture-rendering which I've noticed in GZDoom for many versions.
The lower wall here is now strange-looking.
The lower wall here is now strange-looking.
EDIT: Seems the texture has something with additive rendering in it; Here's the glitched texture's TEXTURES definition:

Code: Select all

Texture "CITYWIND", 66, 132
{
	XScale 1.025
	YScale 0.515
	Patch "P_SPNES1", -406, -4
	{
		Rotate 90
		Blend "#3A4EA5"
	}
	Patch "P_SPNES1", -406, 62
	{
		Rotate 90
		Blend "#3A4EA5"
	}
	Patch "QBLOCKT0", 1, 1
	{
		Blend "#9AD6F5"
	}
	Patch "QBLOCKT0", 1, 67
	{
		Blend "#9AD6F5"
	}
	Patch "P_CFOVER", 1, 1
	{
		Alpha 0.20
		Style Add
	}
	Patch "P_CFOVER", 1, 67
	{
		Alpha 0.20
		Style Add
	}
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [g3.4pre-197-g0affc119f]Additive mid-textures break fog

Post by Graf Zahl »

Please post a runnable example in a separate report. This one will appear rather quickly, now that it is in Closed Bugs.
User avatar
Xane123
Posts: 165
Joined: Tue Nov 24, 2015 1:58 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Inwood, WV
Contact:

Re: [g3.4pre-197-g0affc119f]Additive mid-textures break fog

Post by Xane123 »

Graf Zahl wrote:Please post a runnable example in a separate report. This one will appear rather quickly, now that it is in Closed Bugs.
Okay. I posted about this other bug here.
Post Reply

Return to “Closed Bugs [GZDoom]”