From 90dee2a80b67d1d0fb3b9dfd5f3e095c09e3e178 Mon Sep 17 00:00:00 2001 From: Christopher Kulla Date: Sun, 22 Sep 2024 18:28:41 -0700 Subject: [PATCH] fix: anisotropic_vdf closure should not set IOR (#1870) The MaterialX team noticed this issue here: AcademySoftwareFoundation/MaterialX#2016 Basically, if you add a medium through the anisotropic_vdf closure, it should not force the ior back to 1.0 as this IOR might have been changed by one of the microfacet closures. The IOR already defaults to 1.0 so cases that do not involve a microfacet closure are not affected. Signed-off-by: Chris Kulla --- src/testrender/shading.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/testrender/shading.cpp b/src/testrender/shading.cpp index e7e0fed64..401682d9b 100644 --- a/src/testrender/shading.cpp +++ b/src/testrender/shading.cpp @@ -1542,8 +1542,6 @@ process_medium_closure(const OSL::ShaderGlobals& sg, ShadingResult& result, result.sigma_t = cw * params.extinction; result.sigma_s = params.albedo * result.sigma_t; result.medium_g = params.anisotropy; - result.refraction_ior = 1.0f; - result.priority = 0; // TODO: should this closure have a priority? break; } case MX_MEDIUM_VDF_ID: {