Skip to content

Commit

Permalink
Fixed modifier_thin_film.mdl.
Browse files Browse the repository at this point in the history
thin_film has no effect on specular_bsdf.
  • Loading branch information
droettger committed Jun 26, 2023
1 parent c9557ee commit 05e75c1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions data/mdl/modifier_thin_film.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import ::anno::*;


export material modifier_thin_film(
uniform float parThickness = 500.0,
uniform float parIor = 1.5 [[anno::hard_range(0.0, 5.0)]],
uniform color parSpecularTint = color(1.0)
uniform float parThickness = 500.0 [[anno::hard_range(0.0, 1000.0)]],
uniform float parIor = 1.5 [[anno::hard_range(0.0, 5.0)]],
uniform color parTint = color(1.0)
)
=
material(
Expand All @@ -15,10 +15,12 @@ material(
scattering: df::thin_film(
thickness: parThickness,
ior: color(parIor),
// The thin-film modifier only affects BSDFs with a Fresnel term or scatter_reflect_transmit mode!
base: df::specular_bsdf(
tint: parSpecularTint,
mode: df::scatter_reflect_transmit
// The thin-film modifier only affects BSDFs with a Fresnel term or microfacet models with scatter_reflect_transmit mode!
base: df::microfacet_beckmann_smith_bsdf(
roughness_u: 0.0,
roughness_v: 0.0,
tint: parTint,
mode: df::scatter_reflect_transmit
)
)
)
Expand Down

0 comments on commit 05e75c1

Please sign in to comment.