Sprite not showing behind a glass material

Hello everyone,

I’ve imported a glass material from blender. I can see the skybox and the ground material through the glass;
But the sprites are not showing through that glass.

Anyone got a solution for me? Thanks for your help.

(I can’t import my custom glass into the playground, so here is 2 images)
Looking through the glass:

Looking from outside the glass:

I guess sprite are rendered after the glass rendering group and discarded.
Is it possible to fix it with rendering group @Evgeni_Popov ?

I tried to render sprites after importing the mesh (no result).
Then tried to render imported mesh before rendering sprites (no result too).

I think you are using the glTF transmission extension?

We don’t generate sprites in the refraction RTT. You can enable the generation like this:

See lines 31-33.

Sprites not enabled:

Sprites enabled:

I will create a PR shortly to enable it automatically.

2 Likes

Thank you very much, it works.

But:
It drops my FPS by 16 (I was at 48 even when everything is displayed, now I’m at 32).
Undertand why? :sweat_smile:

And for those who face same thing, call lines 31-33 of Evgeni_Popov playground after rendering GLTF file, or your scene wont have “_transmissionHelper” defined. :wink:

Now the sprites are rendered in the texture, so it seems you have quite a number if the fps dropped so much!

Try to look at the stats in the inspector, with and without the fix, to see where the time is spent.

The PR is ready:

2 Likes

I see what is dropping my fps, it’s the Sprites. I’ll try to some solutions.
Thanks for your help.