Skip to content

Commit

Permalink
fix: anisotropic_vdf closure should not set IOR (AcademySoftwareFound…
Browse files Browse the repository at this point in the history
…ation#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 <[email protected]>
  • Loading branch information
fpsunflower authored and lgritz committed Sep 24, 2024
1 parent 0ba96d0 commit 90dee2a
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 @@ -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: {
Expand Down

0 comments on commit 90dee2a

Please sign in to comment.