Issue with rendering of masked walls

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Issue with rendering of masked walls

Post by _mental_ »

In some particular cases masked walls are rendered as opaque:
map15.jpg
map15.jpg (100.19 KiB) Viewed 554 times
map26.jpg
map26.jpg (96.15 KiB) Viewed 554 times
This issue is encountered on OS X only so far. It appeared however that it's related to drawing of the sky portal. If the sky was rendered, there will be no black pixels instead of transparent ones.
I managed to track it down to a difference in the global render state: texture mode values were different during rendering of masked walls.
This change fixed the issue for me. Although I am not sure that other render state values were not affected by sky rendering and my fix doesn't hide a bigger problem.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Issue with rendering of masked walls

Post by Graf Zahl »

It looks that that code never sets the initial texture mode at all. I think it's OSX only because of the textured dynamic light stuff I recently added.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Issue with rendering of masked walls

Post by _mental_ »

Is there anything else that must be changed except my fix? Is it OK actually?
I suppose you cannot reproduce the problem, so I'm not certain that you will work on it. From the other hand I can reproduce it for sure, but have no idea what I should do above the mentioned fix.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Issue with rendering of masked walls

Post by Graf Zahl »

I haven't had a closer look yet. I was rather busy the last few days.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Issue with rendering of masked walls

Post by Graf Zahl »

Does this still happen? I think this may be related to a bug I fixed recently which was causing all sorts of problems with midtextures.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Issue with rendering of masked walls

Post by _mental_ »

Graf Zahl wrote:Does this still happen? I think this may be related to a bug I fixed recently which was causing all sorts of problems with midtextures.
Yes, it does on the latest.
The texture mode values are still different right before drawing of affected walls: TM_MODULATE with the sky vs. TM_OPAQUE without it. Apparently the latter value is wrong. In my case the difference is caused by sky portal rendering. Maybe there are some other possibilities for changing of the texture mode.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Issue with rendering of masked walls

Post by Graf Zahl »

I believe the problem occurs in BoundTextureDraw2D. That function sets the texture mode to TM_OPAQUE but never resets it to TM_MODULATE which is the assumed default everywhere else.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Issue with rendering of masked walls

Post by _mental_ »

Damn, have no idea how I can miss that. Thanks.
Locked

Return to “Closed Bugs”