Fix: Cycles: Incorrect thin film IOR for backfacing Glass with OSL

Thanks to @main-menu-theme for noticing this!
This commit is contained in:
Lukas Stockner
2025-09-15 18:20:33 +02:00
parent ae7f3a0d18
commit 4eee95c0f9

View File

@@ -18,8 +18,8 @@ shader node_glass_bsdf(color Color = 0.8,
float r2 = clamp(Roughness, 0.0, 1.0);
r2 = r2 * r2;
float eta = max(IOR, 1e-5);
eta = backfacing() ? 1.0 / eta : eta;
float thinfilm_ior = backfacing() ? ThinFilmIOR / eta : ThinFilmIOR;
eta = backfacing() ? 1.0 / eta : eta;
color F0 = F0_from_ior(eta);
color F90 = color(1.0);