Skip to content

Commit 41100f4

Browse files
committed
MDL SDK 2023.1.2 (373000.1755)
1 parent 112a792 commit 41100f4

Some content is hidden

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

43 files changed

+1442
-764
lines changed

CHANGELOG.md

+42-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,50 @@
11
Change Log
22
==========
3-
MDL SDK 2023.1.0 (373000.1077): 14 Dec 2023
3+
MDL SDK 2023.1.2 (373000.1755): 23 Jan 2024
44
-----------------------------------------------
55

66

7+
ABI compatible with the MDL SDK 2023.1.2 (373000.1755) binary release
8+
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))
9+
10+
**Added and Changed Features**
11+
12+
- General
13+
- libbsdf:
14+
- The roughness values computed by the generated auxiliary functions changed to contain
15+
only glossy contributions.
16+
- The color weights for normals and roughness in the generated auxiliary functions
17+
are now reduced by luminance instead of average.
18+
19+
- MDL Compiler and Backends
20+
- Allow more direct assignments of vectors instead of element-wise assignments for HLSL.
21+
- Avoid unnecessary calls to functions whose values are not actually used.
22+
- Avoid reading whole arrays from argument blocks or read-only data segments when
23+
providing those arrays as function parameters. This especially improves rendering
24+
performance of `axf_importer` materials.
25+
- Avoid array copies when accessing arrays provided as function parameters for HLSL/GLSL.
26+
27+
- MDL SDK examples
28+
- Add options to configure the lambda return mode and the generation of PDF and auxiliary
29+
functions to code_gen example.
30+
- Rename "`-p`" parameter of `df_cuda` example to "`--cam`" and use "`-p`" as short form
31+
for "`--mdl_path`" as in other examples.
32+
33+
**Fixed Bugs**
34+
35+
- General
36+
- `nvidia::core_definitions`: Fixed `'--'` in display names.
37+
- Fixed type computation of ternary operator in MDL SDK/neuray.
38+
39+
- MDL Compiler and Backends
40+
- Fixed a rare crash that could happen in an MDL module imports other modules and
41+
import the same module (diamond pattern).
42+
- Fixed default constructor of enum values which sometimes did not choose
43+
the first enumerator as default value.
44+
45+
MDL SDK 2023.1.0 (373000.1077): 14 Dec 2023
46+
-----------------------------------------------
47+
748
ABI compatible with the MDL SDK 2023.1.0 (373000.1077) binary release
849
(see [https://developer.nvidia.com/mdl-sdk](https://developer.nvidia.com/mdl-sdk))
950

INSTALL.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ of examples is of no interest to you.
9797
corresponding SDK 10.0.18362.0. Additionally the optional *Graphic Tools*
9898
feature has to be installed.
9999

100-
- **DirectX Shader Compiler support** *(June 2022)* *(Windows only)*
100+
- **DirectX Shader Compiler support** *(July 2022)* *(Windows only)*
101101
Building the DXR example requires an updated version of the DirectX Shader
102102
Compiler.
103103
Download and extract the pre-compiled x64 binaries from
@@ -180,12 +180,12 @@ features.
180180
binaries.
181181

182182
It is recommended that you build into a subdirectory, not into the repository root.
183-
*C:/projects/mdl-sdk/build/vs2017* for example is fine, assuming you cloned the repository to:
183+
*C:/projects/mdl-sdk/build/vs2022* for example is fine, assuming you cloned the repository to:
184184

185185
C:/projects/mdl-sdk
186186

187187
3. After clicking ``Configure``, CMake asks you to choose the Generator.
188-
Select `Visual Studio 15 2017` (or higher), enter `host=x64` as toolset
188+
Select `Visual Studio 17 2022` (or higher), enter `host=x64` as toolset
189189
and click `Finish`. CMake starts to configure the build and stops several
190190
times when user input is required to resolve dependencies.
191191

@@ -203,7 +203,7 @@ features.
203203
During this process, you may need to setup the following entries based on the selected components:
204204

205205
- **ARNOLD_SDK_DIR** in Ungrouped Entries,
206-
for example: *C:/projects/thirdparty/Arnold-6.0.3.0-windows*
206+
for example: *C:/projects/thirdparty/Arnold-6.2.0.1-windows*
207207

208208
- **clang_PATH** in Ungrouped Entries (only if not found in the PATH),
209209
for example: *C:/Program Files/LLVM-12/bin/clang.exe*

doc/base_module/index.html

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

170170
</div><div id="blackfooter">
171171
<span class="footeritem">
172-
12&#160;December&#160;2023,&#160;13:11,&#160;rev374077, v1.3
172+
23&#160;January&#160;2024,&#160;11:22,&#160;rev374755, v1.3
173173
</span>
174174
<span class="footeritem">
175-
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2023 NVIDIA&nbsp;Corporation.</a> All rights reserved.
175+
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2024 NVIDIA&nbsp;Corporation.</a> All rights reserved.
176176
</span>
177177

178178
</div>

doc/build/doxygen_footer.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<!-- start footer part -->
33
<!--BEGIN GENERATE_TREEVIEW-->
44
<div id="nav-path">
5-
<span class="footeritem">MDL SDK 2023.1.0 (373000.1077): $datetime</span>
5+
<span class="footeritem">MDL SDK 2023.1.2 (373000.1755): $datetime</span>
66
<span class="footeritem">
77
<a href="http://www.nvidia.com/">
8-
&copy;&#160;2023&#160;NVIDIA&#160;Corporation.</a>
8+
&copy;&#160;2024&#160;NVIDIA&#160;Corporation.</a>
99
&#160;All&#160;rights&#160;reserved.
1010
</span>
1111
</div>

doc/core_definitions/index.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,19 @@
144144
<li><span class="nodestatus level2" data-depth="2"></span>
145145
<span class="navlink" data-basename="functions" data-target="perlin-noise-texture"><span class="navnumber">3.4</span> Perlin noise texture</span></li>
146146
<li><span class="nodestatus level2" data-depth="2"></span>
147-
<span class="navlink" data-basename="functions" data-target="perlin-noise-texture-bump-mapping"><span class="navnumber">3.5</span> Perlin noise texture &#8211; bump mapping</span></li>
147+
<span class="navlink" data-basename="functions" data-target="perlin-noise-texture-bump-mapping"><span class="navnumber">3.5</span> Perlin noise texture - bump mapping</span></li>
148148
<li><span class="nodestatus level2" data-depth="2"></span>
149149
<span class="navlink" data-basename="functions" data-target="cellular-noise-texture"><span class="navnumber">3.6</span> Cellular noise texture</span></li>
150150
<li><span class="nodestatus level2" data-depth="2"></span>
151-
<span class="navlink" data-basename="functions" data-target="cellular-noise-texture-bump-mapping"><span class="navnumber">3.7</span> Cellular noise texture &#8211; bump mapping</span></li>
151+
<span class="navlink" data-basename="functions" data-target="cellular-noise-texture-bump-mapping"><span class="navnumber">3.7</span> Cellular noise texture - bump mapping</span></li>
152152
<li><span class="nodestatus level2" data-depth="2"></span>
153153
<span class="navlink" data-basename="functions" data-target="flow-noise-texture"><span class="navnumber">3.8</span> Flow noise texture</span></li>
154154
<li><span class="nodestatus level2" data-depth="2"></span>
155-
<span class="navlink" data-basename="functions" data-target="flow-noise-texture-bump-mapping"><span class="navnumber">3.9</span> Flow noise texture &#8211; bump mapping</span></li>
155+
<span class="navlink" data-basename="functions" data-target="flow-noise-texture-bump-mapping"><span class="navnumber">3.9</span> Flow noise texture - bump mapping</span></li>
156156
<li><span class="nodestatus level2" data-depth="2"></span>
157157
<span class="navlink" data-basename="functions" data-target="3d-checker-texture"><span class="navnumber">3.10</span> 3D checker texture</span></li>
158158
<li><span class="nodestatus level2" data-depth="2"></span>
159-
<span class="navlink" data-basename="functions" data-target="3d-checker-texture-bump-mapping"><span class="navnumber">3.11</span> 3D checker texture &#8211; bump mapping</span></li>
159+
<span class="navlink" data-basename="functions" data-target="3d-checker-texture-bump-mapping"><span class="navnumber">3.11</span> 3D checker texture - bump mapping</span></li>
160160
<li><span class="nodestatus level2" data-depth="2"></span>
161161
<span class="navlink" data-basename="functions" data-target="bitmap-texture-bump"><span class="navnumber">3.12</span> Bitmap texture, bump</span></li>
162162
<li><span class="nodestatus level2" data-depth="2"></span>
@@ -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.231212.A4.pdf">View documentation in A4 format</a><br>
206-
<a href="mdl_core_definitions.231212.LTR.pdf">View documentation in US Letter format</a><br>
205+
<a href="mdl_core_definitions.240123.A4.pdf">View documentation in A4 format</a><br>
206+
<a href="mdl_core_definitions.240123.LTR.pdf">View documentation in US Letter format</a><br>
207207
</div>
208208
<h3>Overriding security settings</h3>
209209

@@ -277,10 +277,10 @@ <h3>Edge</h3>
277277
<span class="footeritem">
278278
</span>
279279
<span class="footeritem">
280-
12&#160;December&#160;2023,&#160;13:12,&#160;rev374077, v1.4
280+
23&#160;January&#160;2024,&#160;11:24,&#160;rev374755, v1.4
281281
</span>
282282
<span class="footeritem">
283-
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2023 NVIDIA&nbsp;Corporation.</a> All rights reserved.
283+
<a href="https://www.nvidia.com/en-us/about-nvidia/legal-info/">&copy; 2024 NVIDIA&nbsp;Corporation.</a> All rights reserved.
284284
</span>
285285

286286
</div>

doc/core_definitions/pages/functions.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ <h2 id="perlin-noise-texture" class="headerlink"><span class="sectionnumber">3.4
548548
</table>
549549
</div>
550550

551-
<h2 id="perlin-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.5</span>Perlin noise texture &#8211; bump mapping</h2>
551+
<h2 id="perlin-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.5</span>Perlin noise texture - bump mapping</h2>
552552

553553

554554
<img id="perlin-noise-bump-texture" src="pages/img/perlin_noise_bump_texture.jpg" data-resize="true" data-wmax="200" data-hmax="200" data-aspect="1.0" data-width="1" data-height="1.0" class="s-imgmargin"></img>
@@ -816,7 +816,7 @@ <h2 id="cellular-noise-texture" class="headerlink"><span class="sectionnumber">3
816816
</table>
817817
</div>
818818

819-
<h2 id="cellular-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.7</span>Cellular noise texture &#8211; bump mapping</h2>
819+
<h2 id="cellular-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.7</span>Cellular noise texture - bump mapping</h2>
820820

821821

822822
<img id="worley-noise-bump-texture" src="pages/img/worley_noise_bump_texture.jpg" data-resize="true" data-wmax="200" data-hmax="200" data-aspect="1.0" data-width="1" data-height="1.0" class="s-imgmargin"></img>
@@ -1104,7 +1104,7 @@ <h2 id="flow-noise-texture" class="headerlink"><span class="sectionnumber">3.8</
11041104
</table>
11051105
</div>
11061106

1107-
<h2 id="flow-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.9</span>Flow noise texture &#8211; bump mapping</h2>
1107+
<h2 id="flow-noise-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.9</span>Flow noise texture - bump mapping</h2>
11081108

11091109

11101110
<img id="flow-noise-bump-texture" src="pages/img/flow_noise_bump_texture.jpg" data-resize="true" data-wmax="200" data-hmax="200" data-aspect="1.0" data-width="1" data-height="1.0" class="s-imgmargin"></img>
@@ -1372,7 +1372,7 @@ <h2 id="3d-checker-texture" class="headerlink"><span class="sectionnumber">3.10<
13721372
</table>
13731373
</div>
13741374

1375-
<h2 id="3d-checker-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.11</span>3D checker texture &#8211; bump mapping</h2>
1375+
<h2 id="3d-checker-texture-bump-mapping" class="headerlink"><span class="sectionnumber">3.11</span>3D checker texture - bump mapping</h2>
13761376

13771377

13781378
<img id="checker-bump-texture" src="pages/img/checker_bump_texture.jpg" data-resize="true" data-wmax="200" data-hmax="200" data-aspect="1.0" data-width="1" data-height="1.0" class="s-imgmargin"></img>

doc/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
</div>
6262
<div id="blackfooter">
6363
<span class="footeritem">
64-
MDL SDK 2023.1.0 (373000.1077): 14 Dec 2023
64+
MDL SDK 2023.1.2 (373000.1755): 23 Jan 2024
6565
</span>
6666
<span class="footeritem">
67-
<a href="http://www.nvidia.com/">&copy;&#160;2023&#160;NVIDIA&#160;Corporation.</a> &#160;All&#160;rights&#160;reserved.
67+
<a href="http://www.nvidia.com/">&copy;&#160;2024&#160;NVIDIA&#160;Corporation.</a> &#160;All&#160;rights&#160;reserved.
6868
</span>
6969
</div>
7070

doc/mdl_sdkapi/getting_started.dox

+5-5
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** (June 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.4, Windows only) \n
150+
- **MaterialX** (github repository, tag: v1.38.7, 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.x) \n
163+
- **OptiX** (7.0 to 7.5) \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

@@ -202,7 +202,7 @@ features.
202202
example binaries.
203203

204204
It is recommended that you build into a subdirectory, not into the example root.
205-
C:/projects/mdl-sdk/examples/build/vs2017 for example is fine, assuming you extracted the mdl-sdk to:
205+
C:/projects/mdl-sdk/examples/build/vs2022 for example is fine, assuming you extracted the mdl-sdk to:
206206

207207
C:/projects/mdl-sdk
208208

@@ -224,7 +224,7 @@ features.
224224
During this process, you may need to setup the following entries based on the selected components:
225225

226226
- **ARNOLD_SDK_DIR** in Ungrouped Entries, \n
227-
for example: *C:/projects/thirdparty/Arnold-6.0.3.0-windows*
227+
for example: *C:/projects/thirdparty/Arnold-6.2.0.1-windows*
228228

229229
- **clang_PATH** in Ungrouped Entries (only if not found in the PATH), \n
230230
for example: *C:/Program Files/LLVM-12/bin/clang.exe*

examples/mdl/nvidia/core_definitions.mdl

+4-4
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ export float3 perlin_noise_bump_texture(
863863
]]
864864
)
865865
[[
866-
anno::display_name("Perlin noise texture -- bump mapping"),
866+
anno::display_name("Perlin noise texture - bump mapping"),
867867
anno::description("Enable bump-map texturing with a random noise pattern"),
868868
anno::thumbnail(".thumbs/perlin_noise_bump_texture.png"),
869869
anno::in_group("Texturing, high level"),
@@ -1068,7 +1068,7 @@ export float3 worley_noise_bump_texture(
10681068
anno::ui_order(6)
10691069
]])
10701070
[[
1071-
anno::display_name("Cellular noise texture -- bump mapping"),
1071+
anno::display_name("Cellular noise texture - bump mapping"),
10721072
anno::description("Allow texturing with a cell forming pattern"),
10731073
anno::thumbnail(".thumbs/worley_noise_bump_texture.png"),
10741074
anno::in_group("Texturing, high level"),
@@ -1332,7 +1332,7 @@ export float3 flow_noise_bump_texture(
13321332
anno::ui_order(10)
13331333
]])
13341334
[[
1335-
anno::display_name("Flow noise texture -- bump mapping"),
1335+
anno::display_name("Flow noise texture - bump mapping"),
13361336
anno::description("Allow texturing with a 2D noise pattern suitable for waves"),
13371337
anno::thumbnail(".thumbs/flow_noise_bump_texture.png"),
13381338
anno::in_group("Texturing, high level"),
@@ -1500,7 +1500,7 @@ export float3 checker_bump_texture(
15001500
]]
15011501
)
15021502
[[
1503-
anno::display_name("3D checker texture -- bump mapping"),
1503+
anno::display_name("3D checker texture - bump mapping"),
15041504
anno::description("Allows texturing a checkerboard pattern"),
15051505
anno::thumbnail(".thumbs/checker_bump_texture.png"),
15061506
anno::in_group("Texturing, high level"),

examples/mdl_sdk/code_gen/example_code_gen.cpp

+29-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ class Options
6565
bool m_fold_all_enum_parameters = false;
6666
bool m_single_init = false;
6767
bool m_ignore_noinline = true;
68+
bool m_disable_pdf = false;
69+
bool m_enable_aux = false;
70+
std::string m_lambda_return_mode;
6871
bool m_warn_spectrum_conv = false;
6972
std::string m_backend = "hlsl";
7073
bool m_use_derivatives = false;
@@ -374,7 +377,16 @@ void code_gen(mi::neuraylib::INeuray* neuray, Options& options)
374377
options.m_adapt_normal ? "on" : "off");
375378
backend->set_option("use_renderer_adapt_microfacet_roughness",
376379
options.m_adapt_microfacet_roughness ? "on" : "off");
377-
380+
backend->set_option("enable_pdf",
381+
!options.m_disable_pdf ? "on" : "off");
382+
backend->set_option("enable_auxiliary",
383+
options.m_enable_aux ? "on" : "off");
384+
if (!options.m_lambda_return_mode.empty()) {
385+
if (backend->set_option(
386+
"lambda_return_mode", options.m_lambda_return_mode.c_str()) != 0) {
387+
exit_failure("Setting 'lambda_return_mode' option failed.");
388+
}
389+
}
378390

379391
// ----------------------------------------------------------------------------------------
380392

@@ -583,6 +595,10 @@ code_gen [options] <qualified_material_name>
583595
--fe Fold enum parameters.
584596
--single-init Compile in single init mode.
585597
--dian Disable ignoring anno::noinline() annotations.
598+
--disable_pdf Disable generation of separate PDF function.
599+
--enable_aux Enable generation of auxiliary function.
600+
--lambda_return_mode <mode> Set how base types and vector types are returned for PTX and LLVM
601+
backends. One of {default, sret, value}.
586602
--adapt_normal Enable renderer callback to adapt the normal.
587603
--adapt_microfacet_roughness Enable renderer callback to adapt the roughness for
588604
microfacet BSDFs.
@@ -621,6 +637,18 @@ bool Options::parse(int argc, char* argv[])
621637
m_single_init = true;
622638
else if (arg == "--dian")
623639
m_ignore_noinline = false;
640+
else if (arg == "--disable_pdf")
641+
m_disable_pdf = true;
642+
else if (arg == "--enable_aux")
643+
m_enable_aux = true;
644+
else if (arg == "--lambda_return_mode") {
645+
if (i == argc - 1)
646+
{
647+
std::cerr << "error: Argument for --lambda_return_mode missing." << std::endl;
648+
return false;
649+
}
650+
m_lambda_return_mode = argv[++i];
651+
}
624652
else if (arg == "--adapt_normal")
625653
m_adapt_normal = true;
626654
else if (arg == "--adapt_microfacet_roughness")

0 commit comments

Comments
 (0)