-
-
Notifications
You must be signed in to change notification settings - Fork 24k
Description
Godot version: 3.1.1
OS/device including version: Windows 10
Issue description:
Currently it is not possible to create a material that performs refraction while maintaining visibility of transparent objects behind it.
I understand that it is more generally the case that screen-space shaders are not capable of reading color data written by transparent objects (as per #18332).
This is turning into a significant problem for the game I'm working on. In short, I'm making a marble platformer that will have a character inside the marble, appearing to push it around. However, I am fairly certain that I can only make said character look the best through the use of transparent materials, but this prevents me from using a refractive material on the marble, as doing so would prevent me from using transparent materials on the character (which is probably more important, from an artistic standpoint).
It would be optimal if I could use transparent materials on the character and a refractive material on the marble. I can't tell if this is actually technically impossible (as per #11523) or if it is just done for efficiency. If it is just done for efficiency, there should be some sort of way to control that, perhaps some options for what transparent materials write to (e.g. a "write to screen texture" and a "write depth" option).
Steps to reproduce:
Create an object with a transparent material and put it behind an object with a refractive material (i.e. one with "Refraction" enabled).
Minimal reproduction project:
TransparentRefractionTest.zip

