Skip to content

Commit

Permalink
fix: anisotropic_vdf closure should not set IOR (#1870)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
fpsunflower committed Sep 23, 2024
1 parent 78e5392 commit 00473ce
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/testrender/shading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1653,8 +1653,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: {
Expand Down

0 comments on commit 00473ce

Please sign in to comment.