2
$\begingroup$

I am having an issue with my glass shader where objects using it do not show up through each other.

glass issue

Here is my current setup for the shader:

shader setup

$\endgroup$
1
  • $\begingroup$ No. Refraction, which the glass shader uses, is very limited in Eevee. This is the nature of rasterization vs. raytracing. Use Cycles if you want to do crazy things with refraction. $\endgroup$
    – Nathan
    Commented Apr 10, 2021 at 23:49

2 Answers 2

2
$\begingroup$

Try something like this for your "glass" shader. As Nathan mentioned, rasterized transparency will always be lacking compared to Raytracing, and though EEVEE really doesn't like transparency through transparency, this shader attempts to strike a happy medium. Try it and see for yourself. Pay attention to the Blend Modes on the right, including the backface culling and show backface checkboxes (I just noticed Show backface is covered in my image, but it is un-checked):

EveeGlass1

However, glass is very much assisted (both in eevee and Cycles) by the use of an HDRI environment map. Switch to your World shading tab and add an Environment Texture (not Image Texture) with your HDRI. Blender's built in HDRI's are in the blender folder at .../2.93/datafiles/studiolights/world and many more can be found online for free. One of the most popular places is HDRI Haven (https://hdrihaven.com/hdris/).

EeveeHDRI

If you want the effect from the lighting, but don't want the image in your background, you can separate them by using a Mix Shader, using the Is Camera Ray output of a Light Path node as the mix factor:

EeveeGlass2

$\endgroup$
1
  • 1
    $\begingroup$ Not a bad solution. Before this, I used a cheap workaround of just mixing between a the Glass BSDF and a Transparent BSDF. That way you get just enough proper transparency and refraction for it to be 'good enough'. $\endgroup$
    – Sandberg
    Commented Apr 11, 2021 at 1:43
1
$\begingroup$

Make sure that Render Properties -> Screen Space Reflections -> Refraction is on enter image description here

In EEVEE Objects with refraction on in their shader can't be seen when they're behind other objects.

Here's the best "fake glass" EEVEE Shader I've found EEVEE Fake Glass

In this shader disable Screen Space Refraction.

Set the blend mode to "Alpha Blend"

enable backface culling

The RGB Curves gives fine control over the Fresnel effect but isn't really necessary

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .