[RVGL 19.0430] Missing glass on shader renderer

Report issues and bugs here.
User avatar
EvgenKo423
Posts: 22
Joined: Sun May 05, 2019 11:14 am

[RVGL 19.0430] Missing glass on shader renderer

Unread post by EvgenKo423 » Sun May 12, 2019 9:41 am

Ok, some more serious bugs here. Toys in the Hood 2: when I use shader renderer somebody stoles my glass. :(

The glass effect is missing, the window and doors are completely transparent!
http://screenshotcomparison.com/comparison/135503
However, I can see some glassy effect on the other side of the doors (on both renderers).
User avatar
Huki
Developer
Posts: 192
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: [RVGL 19.0430] Missing glass on shader renderer

Unread post by Huki » Sun May 12, 2019 1:55 pm

This is a known issue and another consequence of shader and legacy using different techniques. You can notice this in the Supermarket 2 sliding doors too, as also in Spa-Volt. In short, fixing this requires updating the sliding door mesh. Read below for a longer answer.

The legacy renderer handles env effects by drawing each poly twice, once for diffuse and a second time for the env. The shader renderer uses multi-texturing, i.e., the poly is rendered once with both diffuse and env textures applied on it. Now, the sliding door is an opaque quad with the interiors mapped to pure-black. This means pixels that form the interior of the quad get rejected and you see nothing. In the legacy renderer, you still see the env effect because this is a duplicate poly rendered over the original poly.

To fix this, the quad forming the front and back of the door have to be chopped up so the rim and interior are separated. Then, polys constituting the rim should be kept opaque, while the interior quad should have additive blending enabled. This should preserve the glass effect as intended in the shader renderer, and it should keep looking as before in the legacy renderer.
User avatar
EvgenKo423
Posts: 22
Joined: Sun May 05, 2019 11:14 am

Re: [RVGL 19.0430] Missing glass on shader renderer

Unread post by EvgenKo423 » Sun May 12, 2019 3:16 pm

Sorry, can't find any mention of that. Good to hear it is known already. :)
Thanks for an explanation.
Post Reply