Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix BaseMaterial3D refracting objects located in front of the material
Depth comparison is now used to prevent refraction from occurring if the pixel being refracted is located in front of the object. For pixels slightly behind the object, a `smoothstep()` curve is used to progressively increases refraction intensity as the distance between the object and the refraction increases. This avoids sudden discontinuities in the refraction. Co-authored-by: GeneralLegendary <generallegendary456@gmail.com>
- Loading branch information