Page 1 of 1
Issue with rendering of masked walls
Posted: Fri May 06, 2016 12:43
by _mental_
In some particular cases masked walls are rendered as opaque:

- map15.jpg (100.19 KiB) Viewed 555 times

- map26.jpg (96.15 KiB) Viewed 555 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.
Re: Issue with rendering of masked walls
Posted: Fri May 06, 2016 20:01
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.
Re: Issue with rendering of masked walls
Posted: Mon May 09, 2016 12:23
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.
Re: Issue with rendering of masked walls
Posted: Mon May 09, 2016 19:11
by Graf Zahl
I haven't had a closer look yet. I was rather busy the last few days.
Re: Issue with rendering of masked walls
Posted: Mon May 09, 2016 23:26
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.
Re: Issue with rendering of masked walls
Posted: Tue May 10, 2016 8:40
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.
Re: Issue with rendering of masked walls
Posted: Tue May 10, 2016 9:22
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.
Re: Issue with rendering of masked walls
Posted: Tue May 10, 2016 9:42
by _mental_
Damn, have no idea how I can miss that. Thanks.