Skip to content

Commit a71786e

Browse files
MDL SDK 2023.1.4 (373000.3036)
1 parent 08830ab commit a71786e

File tree

62 files changed

+2198
-1325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2198
-1325
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ src/io/image/image/tests/reference/export_of_test_gray_alpha_bpc_2.png.png filte
44
src/io/image/image/tests/reference/export_of_test_pt_uint16.png.tif filter=lfs diff=lfs merge=lfs -text
55
src/io/image/image/tests/reference/export_of_test_jpg_progressive.jpg.png filter=lfs diff=lfs merge=lfs -text
66
src/io/image/image/tests/test_pt_uint16.png filter=lfs diff=lfs merge=lfs -text
7+
8+
# Prevent MBSDF files without reflection and transmission from being misidentified as text files.
9+
*.mbsdf binary

CHANGELOG.md

+52
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
Change Log
22
==========
3+
MDL SDK 2023.1.4 (373000.3036): 18 Mar 2024
4+
-----------------------------------------------
5+
6+
ABI compatible with the MDL SDK 2023.1.4 (373000.3036) binary release
7+
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))
8+
9+
**Added and Changed Features**
10+
11+
- General
12+
- Added a linker script on Linux that hides all defined symbols except for the factory symbol(s).
13+
14+
- MDL SDK examples
15+
- Updated OptiX 7 example to support up to OptiX SDK 8.0.0.
16+
- Example AXF to MDL
17+
- Added support for AxF 1.9 sheen for SVBRDF representation.
18+
- Improved compatibility for refracting carpaint representation.
19+
- Improved mapping of Cook-Torrance spreads (used for non-measured BRDF fallback
20+
and flake orientation).
21+
- Example Execution GLSL:
22+
- Added enable/disable SSBO and noise function remap by command line arguments.
23+
24+
**Fixed Bugs**
25+
26+
- General
27+
- Fixed a crash if `IMdl_resolved_resource_element::create_reader()` returns `nullptr`.
28+
This might be due to an incorrect user implementation, or in legitimate cases, e.g.,
29+
if the file disappeared between resolving and the query.
30+
- Fixed a memory leak involving the interface pointer used with the context option
31+
"user_data".
32+
33+
- MDL Compiler and Backends
34+
- Fixed inconsistent storing and reading of matrix material parameters in target
35+
argument blocks for the native backend.
36+
- Avoid warnings about unsupported PTX features for native backend.
37+
- Don't let LLVM abort at shutdown, when writing to stderr fails.
38+
- mdltlc: Fixed error in pattern matching of material nodes.
39+
- Fixed HLSL/GLSL code generation that sometimes placed temporaries into a
40+
loop body that are used outside, causing invalid code.
41+
- Fixed crash in the core compiler that might happen on heavily malformed MDL code.
42+
- Prevent errors/warnings in the core compiler without line numbers
43+
due to internal clone operations.
44+
- Slightly speedup compilation in multithreaded operations.
45+
- Do not try to resolve empty resource URLs; Note that this is still malformed MDL code.
46+
47+
- MDL SDK examples
48+
- Example df_vulkan
49+
- Fixed command line options to match other examples for `--mdl_path` / `-p` option.
50+
- Example AXF to MDL
51+
- Fixed re-coding of BRDF colors table (used in non-measured BRDF fallback).
52+
- Example Execution GLSL:
53+
- Fixed OpenGL 3.3 mode.
54+
355
MDL SDK 2023.1.3 (373000.2208): 14 Feb 2024
456
-----------------------------------------------
557

INSTALL.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ features.
148148
The old version is available in the
149149
[CUDA Toolkit Archive](https://developer.nvidia.com/cuda-toolkit-archive).
150150

151-
- **OptiX** *(7.0 to 7.5)*
151+
- **OptiX** *(7.0.0 to 8.0.0)*
152152
This dependency is required to build the OptiX 7 example.
153153
Please follow the instructions on the [OptiX Website](https://developer.nvidia.com/designworks/optix/download).
154154

cmake/linkerscript.txt.in

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
global:
3+
@_GLOBAL@
4+
local:
5+
*;
6+
};

cmake/utilities.cmake

+20-1
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ function(CREATE_FROM_BASE_PRESET)
678678
# general option MDL_MSVC_DYNAMIC_RUNTIME_EXAMPLES
679679
set(options WIN32 WINDOWS_UNICODE EXAMPLE DYNAMIC_MSVC_RUNTIME STATIC_MSVC_RUNTIME SKIP_UNDEFINED_SYMBOL_CHECK)
680680
set(oneValueArgs TARGET VERSION TYPE NAMESPACE EXPORT_NAME OUTPUT_NAME VS_PROJECT_NAME EMBED_RC)
681-
set(multiValueArgs SOURCES ADDITIONAL_INCLUDE_DIRS)
681+
set(multiValueArgs SOURCES ADDITIONAL_INCLUDE_DIRS EXPORTED_SYMBOLS)
682682
cmake_parse_arguments(CREATE_FROM_BASE_PRESET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
683683

684684
# sanity check
@@ -826,6 +826,25 @@ function(CREATE_FROM_BASE_PRESET)
826826
endif()
827827
endif()
828828

829+
# exported symbols
830+
if(CREATE_FROM_BASE_PRESET_EXPORTED_SYMBOLS)
831+
if(LINUX)
832+
set(_GLOBAL "")
833+
foreach(_SYMBOL ${CREATE_FROM_BASE_PRESET_EXPORTED_SYMBOLS})
834+
set(_GLOBAL "${_GLOBAL}${_SYMBOL};\n")
835+
endforeach()
836+
configure_file(
837+
"${MDL_BASE_FOLDER}/cmake/linkerscript.txt.in"
838+
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/linkerscript.txt"
839+
@ONLY
840+
)
841+
target_link_libraries(${CREATE_FROM_BASE_PRESET_TARGET}
842+
PRIVATE
843+
-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/linkerscript.txt
844+
)
845+
endif()
846+
endif()
847+
829848
# configure visual studio and maybe other IDEs
830849
setup_ide(TARGET ${CREATE_FROM_BASE_PRESET_TARGET}
831850
SOURCES ${CREATE_FROM_BASE_PRESET_SOURCES}

doc/base_module/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ <h3>Edge</h3>
169169

170170
</div><div id="blackfooter">
171171
<span class="footeritem">
172-
12&#160;February&#160;2024,&#160;20:26,&#160;rev375208, v1.3
172+
18&#160;March&#160;2024,&#160;20:40,&#160;rev376036, v1.3
173173
</span>
174174
<span class="footeritem">
175175
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2024 NVIDIA&nbsp;Corporation.</a> All rights reserved.

doc/build/doxygen_footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- start footer part -->
33
<!--BEGIN GENERATE_TREEVIEW-->
44
<div id="nav-path">
5-
<span class="footeritem">MDL SDK 2023.1.3 (373000.2208): $datetime</span>
5+
<span class="footeritem">MDL SDK 2023.1.4 (373000.3036): $datetime</span>
66
<span class="footeritem">
77
<a href="http://www.nvidia.com/">
88
&copy;&#160;2024&#160;NVIDIA&#160;Corporation.</a>

doc/core_definitions/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ <h2>Page cannot be loaded</h2>
202202
bottom of the page or from the following links:</p>
203203

204204
<div style="padding-left:2em;">
205-
<a href="mdl_core_definitions.240212.A4.pdf">View documentation in A4 format</a><br>
206-
<a href="mdl_core_definitions.240212.LTR.pdf">View documentation in US Letter format</a><br>
205+
<a href="mdl_core_definitions.240318.A4.pdf">View documentation in A4 format</a><br>
206+
<a href="mdl_core_definitions.240318.LTR.pdf">View documentation in US Letter format</a><br>
207207
</div>
208208
<h3>Overriding security settings</h3>
209209

@@ -277,7 +277,7 @@ <h3>Edge</h3>
277277
<span class="footeritem">
278278
</span>
279279
<span class="footeritem">
280-
12&#160;February&#160;2024,&#160;20:27,&#160;rev375208, v1.4
280+
18&#160;March&#160;2024,&#160;20:40,&#160;rev376036, v1.4
281281
</span>
282282
<span class="footeritem">
283283
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2024 NVIDIA&nbsp;Corporation.</a> All rights reserved.

doc/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</div>
6262
<div id="blackfooter">
6363
<span class="footeritem">
64-
MDL SDK 2023.1.3 (373000.2208): 14 Feb 2024
64+
MDL SDK 2023.1.4 (373000.3036): 18 Mar 2024
6565
</span>
6666
<span class="footeritem">
6767
<a href="http://www.nvidia.com/">&copy;&#160;2024&#160;NVIDIA&#160;Corporation.</a> &#160;All&#160;rights&#160;reserved.

doc/mdl_sdkapi/getting_started.dox

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ of examples is of no interest to you.
109109
corresponding SDK 10.0.18362.0. Additionally the optional *Graphic Tools*
110110
feature has to be installed.
111111

112-
- **DirectX Shader Compiler support** (July 2022) (Windows only) \n
112+
- **DirectX Shader Compiler support** (July 2022) (Windows only) \n
113113
Building the DXR example requires an updated version of the DirectX Shader
114114
Compiler. \n
115115
Download and extract the pre-compiled x64 binaries from
@@ -147,7 +147,7 @@ features.
147147
Pre-compiled binaries can be found on
148148
[llvm.org](http://releases.llvm.org/download.html#12.0.1).
149149

150-
- **MaterialX** (github repository, tag: v1.38.7, Windows only) \n
150+
- **MaterialX** (github repository, tag: v1.38.9, Windows only) \n
151151
This dependency adds MaterialX support to the DXR example. \n
152152
Please download a release from
153153
[github](https://github.com/AcademySoftwareFoundation/MaterialX/releases). \n
@@ -160,7 +160,7 @@ features.
160160
The old version is available in the
161161
[CUDA Toolkit Archive](https://developer.nvidia.com/cuda-toolkit-archive).
162162

163-
- **OptiX** (7.0 to 7.5) \n
163+
- **OptiX** (7.0.0 to 8.0.0) \n
164164
This dependency is required to build the OptiX 7 example. \n
165165
Please follow the instructions on the [OptiX Website](https://developer.nvidia.com/designworks/optix/download).
166166

examples/mdl/nvidia/axf_importer/axf_importer.mdl

+49-7
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ import ::math::*;
3838
// the version of this module loosely follows the corresponding
3939
// version of the AxF SDK the axf importer uses / supports
4040
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")
4343
]];
4444

4545

@@ -222,6 +222,14 @@ export material svbrdf(
222222
anno::hidden()
223223
]],
224224
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()
225233
[[
226234
anno::hidden()
227235
]]
@@ -231,7 +239,7 @@ export material svbrdf(
231239
anno::hidden(),
232240
anno::description("MDL implementation of the SVBRDF model used in AxF files"),
233241
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."),
235243
anno::key_words(string[]("axf","svbrdf"))
236244
]]
237245
= let {
@@ -384,6 +392,10 @@ export material svbrdf(
384392
df::color_bsdf_component(diffuse.tint, df::diffuse_reflection_bsdf()))
385393
);
386394

395+
//
396+
// clearcoat
397+
//
398+
387399
float clearcoat_ior = has_clearcoat ? base::file_texture(
388400
texture: clearcoat_ior_texture,
389401
uvw: coordinate,
@@ -410,11 +422,41 @@ export material svbrdf(
410422
bsdf coated = has_clearcoat ?
411423
df::fresnel_layer(ior: clearcoat_ior, weight: 1.0, layer: df::specular_bsdf(tint: clearcoat_color), base: base, normal: clearcoat_normal) :
412424
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+
414456
bsdf surface = df::weighted_layer(
415457
weight: 1.0,
416458
normal: normal,
417-
layer: coated
459+
layer: coated_sheen
418460
);
419461

420462
// height texture is in millimeters, respect that in the scale
@@ -875,7 +917,7 @@ export material carpaint(
875917
anno::hidden(),
876918
anno::description("MDL approximation of the AxF carpaint material"),
877919
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."),
879921
anno::key_words(string[]("axf","carpaint"))
880922
]]
881923
= let {
@@ -1007,7 +1049,7 @@ export material volumetric(
10071049
anno::hidden(),
10081050
anno::description("MDL version of the AxF volumetric material"),
10091051
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."),
10111053
anno::key_words(string[]("axf","volumetric"))
10121054
]]
10131055
= material(

examples/mdl/nvidia/core_definitions.mdl

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module [[
6969
anno::display_name("NVIDIA core definitions")
7070
]];
7171

72-
const string COPYRIGHT = "Copyright 2023 NVIDIA Corporation. All rights reserved.";
72+
const string COPYRIGHT = "Copyright 2024 NVIDIA Corporation. All rights reserved.";
7373

7474
//some local functions, dont document
7575
// blend two normals, similar to

examples/mdl/nvidia/core_definitions_de.xlf

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<note from="translator">::anno::author(string)</note>
3333
</trans-unit>
3434
<trans-unit id="6" approved="yes">
35-
<source xml:space="preserve">Copyright 2023 NVIDIA Corporation. All rights reserved.</source>
35+
<source xml:space="preserve">Copyright 2024 NVIDIA Corporation. All rights reserved.</source>
3636
<target xml:space="preserve"></target>
3737
<note from="translator">::anno::copyright_notice(string)</note>
3838
</trans-unit>

examples/mdl/nvidia/core_definitions_fr.xlf

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@
324324
::anno::author(string) light_ies</note>
325325
</trans-unit>
326326
<trans-unit id="56">
327-
<source xml:space="preserve">Copyright 2023 NVIDIA Corporation. All rights reserved.</source>
328-
<target xml:space="preserve">Copyright 2023 NVIDIA Corporation. Tous droits réservés.</target>
327+
<source xml:space="preserve">Copyright 2024 NVIDIA Corporation. All rights reserved.</source>
328+
<target xml:space="preserve">Copyright 2024 NVIDIA Corporation. Tous droits réservés.</target>
329329
<note from="translator">::anno::copyright_notice(string) blend_colors(color,color,::base::color_layer_mode,float)
330330
::anno::copyright_notice(string) file_texture(texture_2d,::base::mono_mode,float,float,float2,float2,float,bool,int,bool)
331331
::anno::copyright_notice(string) perlin_noise_texture(color,color,bool,int,bool,float,float,float3,float3,float3,int)

0 commit comments

Comments
 (0)