Can I mix opaque and screenspace refraction in filament? #6777
Unanswered
EnviralDesign
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Filament respects depth ordering for refraction. Opaque objects in front of a refractive object won’t appear in the refraction. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an opaque ground plane, and an opaque foreground object. I have a third object in between the two opaque ones that has screen space refractions enabled.
Can Filament handle only showing the background opaque object in it's screenspace refraction and not refracting the foreground opaque object?
A bit more context, I am working on my implementation of filament in TouchDesigner, a LOT has to change to accommodate it, but I am doing my best.
My current setup has the opaque pass rendering all the opaque shaded objects, then the transparent pass rendering all the transparent objects, but the screen space refraction pass I am generating is of the opaque pass, so depth information is lost.. As you can see the water geometry is refracting the suzzane heads which are in front of the water, and thus incorrect.

I cannot think of an easy solution to this at the moment, so I am curious if this limitation exists in Filament? Or if it's handled in some way, can someone shed some light on how it's handled (or just point me to where I can look in the code)
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions