@@ -38,8 +38,8 @@ import ::math::*;
38
38
// the version of this module loosely follows the corresponding
39
39
// version of the AxF SDK the axf importer uses / supports
40
40
module [[
41
- anno::version(1, 7, 100 ),
42
- anno::display_name("Materials used by the AxF importer")
41
+ anno::version(1, 9, 0 ),
42
+ anno::display_name("Materials used by the AxF importer")
43
43
]];
44
44
45
45
@@ -222,6 +222,14 @@ export material svbrdf(
222
222
anno::hidden()
223
223
]],
224
224
uniform texture_2d specular_amount_texture = texture_2d()
225
+ [[
226
+ anno::hidden()
227
+ ]],
228
+ uniform texture_2d sheen_color_texture = texture_2d()
229
+ [[
230
+ anno::hidden()
231
+ ]],
232
+ uniform texture_2d sheen_roughness_texture = texture_2d()
225
233
[[
226
234
anno::hidden()
227
235
]]
@@ -231,7 +239,7 @@ export material svbrdf(
231
239
anno::hidden(),
232
240
anno::description("MDL implementation of the SVBRDF model used in AxF files"),
233
241
anno::author("NVIDIA Corporation"),
234
- anno::copyright_notice("Copyright 2023 NVIDIA Corporation. All rights reserved."),
242
+ anno::copyright_notice("Copyright 2024 NVIDIA Corporation. All rights reserved."),
235
243
anno::key_words(string[]("axf","svbrdf"))
236
244
]]
237
245
= let {
@@ -384,6 +392,10 @@ export material svbrdf(
384
392
df::color_bsdf_component(diffuse.tint, df::diffuse_reflection_bsdf()))
385
393
);
386
394
395
+ //
396
+ // clearcoat
397
+ //
398
+
387
399
float clearcoat_ior = has_clearcoat ? base::file_texture(
388
400
texture: clearcoat_ior_texture,
389
401
uvw: coordinate,
@@ -410,11 +422,41 @@ export material svbrdf(
410
422
bsdf coated = has_clearcoat ?
411
423
df::fresnel_layer(ior: clearcoat_ior, weight: 1.0, layer: df::specular_bsdf(tint: clearcoat_color), base: base, normal: clearcoat_normal) :
412
424
base;
413
-
425
+
426
+ //
427
+ // sheen
428
+ //
429
+
430
+ base::texture_return sheen_color = base::file_texture(
431
+ texture: sheen_color_texture,
432
+ uvw: coordinate,
433
+ wrap_u: wrap,
434
+ wrap_v: wrap,
435
+ mono_source: base::mono_maximum
436
+ );
437
+
438
+ base::texture_return sheen_roughness = base::file_texture(
439
+ texture: sheen_roughness_texture,
440
+ uvw: coordinate,
441
+ wrap_u: wrap,
442
+ wrap_v: wrap,
443
+ mono_source: base::mono_maximum
444
+ );
445
+
446
+ bool has_sheen = tex::texture_isvalid(sheen_color_texture) && tex::texture_isvalid(sheen_roughness_texture);
447
+ bsdf coated_sheen = has_sheen ? df::weighted_layer(
448
+ weight: sheen_color.mono,
449
+ layer: df::sheen_bsdf(
450
+ roughness: sheen_roughness.mono,
451
+ tint: sheen_color.tint / sheen_color.mono,
452
+ multiscatter_tint: color(1.0f),
453
+ multiscatter: coated),
454
+ base: coated) : coated;
455
+
414
456
bsdf surface = df::weighted_layer(
415
457
weight: 1.0,
416
458
normal: normal,
417
- layer: coated
459
+ layer: coated_sheen
418
460
);
419
461
420
462
// height texture is in millimeters, respect that in the scale
@@ -875,7 +917,7 @@ export material carpaint(
875
917
anno::hidden(),
876
918
anno::description("MDL approximation of the AxF carpaint material"),
877
919
anno::author("NVIDIA Corporation"),
878
- anno::copyright_notice("Copyright 2023 NVIDIA Corporation. All rights reserved."),
920
+ anno::copyright_notice("Copyright 2024 NVIDIA Corporation. All rights reserved."),
879
921
anno::key_words(string[]("axf","carpaint"))
880
922
]]
881
923
= let {
@@ -1007,7 +1049,7 @@ export material volumetric(
1007
1049
anno::hidden(),
1008
1050
anno::description("MDL version of the AxF volumetric material"),
1009
1051
anno::author("NVIDIA Corporation"),
1010
- anno::copyright_notice("Copyright 2023 NVIDIA Corporation. All rights reserved."),
1052
+ anno::copyright_notice("Copyright 2024 NVIDIA Corporation. All rights reserved."),
1011
1053
anno::key_words(string[]("axf","volumetric"))
1012
1054
]]
1013
1055
= material(
0 commit comments