Page 1 of 1

[RVGL 19.0430] Missing glass on shader renderer

Posted: Sun May 12, 2019 9:41 am
by EvgenKo423
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).

Re: [RVGL 19.0430] Missing glass on shader renderer

Posted: Sun May 12, 2019 1:55 pm
by Huki
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.

Re: [RVGL 19.0430] Missing glass on shader renderer

Posted: Sun May 12, 2019 3:16 pm
by EvgenKo423
Sorry, can't find any mention of that. Good to hear it is known already. :)
Thanks for an explanation.