Skip to content

Releases: NVIDIA/MDL-SDK

MDL SDK 2021.1.1 (349500.8264): 18 Mar 2022

05 Apr 12:33
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2021.1.1 (349500.8264) binary release
(see https://developer.nvidia.com/mdl-sdk)

Known Issues

  • The version text in the MI_NEURAYLIB_PRODUCT_VERSION_STRING macro
    in the version.h include file contains the previous version number
    of "2021.1" instead of "2021.1.1".

Added and Changed Features

  • Image File Format Plugins

    • Support .rgb extension for textures in the SGI file format.

Fixed Bugs

  • General

    • Fixed filename extension mismatch when exporting textures referenced from MDL modules.
      Under certain circumstances, the texture was copied, but got a different filename extension,
      causing problems importing the MDL module again.
    • Fixed creation of function calls of the cast operator if the target type has frequency
      qualifiers. Similarly, fixed creation of function calls of the ternary operator if the
      argument types have frequency qualifiers.
    • Fixed handling of memory allocation failures in IImage_api::create_canvas()/create_tile()
      methods.
    • Also encode the simple name of function definitions. For almost all functions this does not
      make any change since the simple name is usually an identifier, except for a couple of
      operators from the builtins module.
  • MDL Compiler and Backends

    • libbsdf: Fixed incorrect child normal orientation usage in df::(color_)fresnel_layer,
      df::(color_)custom_curve_layer and df::(color_)measured_curve_layer for backside hits.
    • HLSL backend: Fixed code generation for scene data access functions inside automatically
      derived expressions.

MDL SDK 2021.1 (349500.7063): 18 Jan 2022

27 Jan 21:51
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2021.1 (349500.7063) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • MDL 1.7 Language Specification

    • Removed the draft status of this document.

    • Clarified that constants can be declared locally as well, which is
      working since MDL 1.0.

    • Clarified that the thin_film modifier applies only to
      directly connected BSDFs that have a Fresnel term.

    • Clarified that the state::normal() orientation is
      facing outward from the volume, with thin-walled materials
      treated as enclosing an infinitesimally thin volume, such that
      both sides are facing outward and the normal always points to the
      observer.

  • General

    • The module ::core_definitions requires now MDL 1.6 and contains a new material
      surface_falloff.
    • Added support for texture selectors. The selector can be queried with methods on IImage,
      ITexture, IVolume_data, IValue_texture, and ITarget_code. For non-volume data
      textures, the supported selectors are restricted to "R", "G", "B", and "A" for now.
    • Renamed IVolume_data::get_channel_name() to IVolume_data::get_selector() for consistency
      with IImage and ITexture. The old method is still available if
      MI_NEURAYLIB_DEPRECATED_12_1 is defined.
    • The signature of IMdl_factory::create_texture() has been extended to specify the selector.
      The old signature is deprecated and still available if MI_NEURAYLIB_DEPRECATED_12_1 is
      defined.
    • Added IImage_api::create_canvas_from_reader() to enable canvas creation directly from a
      reader (in addition to create_canvas_from_buffer()).
    • Added the methods get_pixel_type_for_channel() and extract_channel() to IImage_api,
      which are useful for extracting RGBA channels from existing textures.
    • Added a warning to catch some wrong implementations of
      IMdl_resolved_module::get_module_name().
    • Improved resource enumeration on modules. The new method IModule::get_resource() returns
      an IValue_resource with all details, including gamma mode and selector. The old methods
      returning the individual bits are deprecated and still available if
      MI_NEURAYLIB_DEPRECATED_12_1 is defined.
    • Added overloads of IValue_factory::create() that accept a range annotation as argument, and
      a type and an entire annotation block. This makes it simpler to create values that observe
      range annotations. Modified Definition_wrapper to make use of the latter if a parameter has
      no default.
    • Added IFunction_call::reset_argument() which sets an argument back to the parameter default
      (if present), or an value observing given range annotations, or a default-constructed value.
    • Extended IValue_factory::compare() and IExpression_factory::compare() to support floating
      point comparisons with an optional epsilon range.
    • The materials-are-functions feature is now enabled by default. See the documentation
      referenced from IMdl_configuration::set_materials_are_functions(). All examples have been
      updated to avoid usage of IMaterial_definition completely, and IMaterial_instance as much
      as possible.
    • Added an user_data option to the IMdl_execution_context, which allows the user to pass
      its own interface pointer around, in particular to the methods of IMdl_entity_resolver.
    • Improved performance of editing of instances of IMdl_function_call, in particular for
      instances with a large set of arguments. Depending on the exact circumstances, this can cut
      the time for a full edit cycle (create transaction, create argument editor, change argument,
      destroy argument editor, commit transaction) in half. An additional speedup can be obtained
      by making use of the additional optional argument of Argument_editor.
    • Extended IExpression_factory::compare() to support deep comparisons of call expressions.
      Useful to figure out whether an exporter needs to export an argument, or can rely on the
      corresponding default on the definition.
    • Export to EXR takes now the quality parameter into account: a value of 50 or less selects
      half as channel type.
    • Added create_reader() and create_writer() to IMdl_impexp_api.
    • Changed the behavior of IImage_api::adjust_gamma() to include the alpha channel. This also
      affects export operations (if force_default_gamma is set) and the MDL texture runtime if
      derivatives are enabled.
    • Added an implementation variant based on std::atomic_uint32_t to Atom32. This results
      in a large speedup on ARM, and on a rather small speedup on Windows.
    • Added support for animated textures:
      • The signature of various methods on IImage and ITexture has been changed. The frame
        index has been added as first parameter and the order of uvtile index and mipmap level
        has been flipped. The default arguments have been removed. The old signatures are still
        available if MI_NEURAYLIB_DEPRECATED_12_1 is defined. Methods to query the mapping
        between frame index and frame number have been added.
      • The method uvtile_marker_to_string() on IMdl_impexp_api and IExport_api has been
        renamed to frame_uvtile_marker_to_string(). It is still available under the old name if
        MI_NEURAYLIB_DEPRECATED_12_1 is defined. The method uvtile_string_to_marker() on both
        interfaces has been deprecated without replacement. The last component of
        IImage::get_original_filename() is an alternative (if available), or construct a custom
        string from scratch.
      • The interface IMdl_resolved_resource has been split such that it represents an array of
        instances of the new interface IMdl_resolved_resource_element, where each element
        corresponds to a texture frame (only one for non-animated textures and other resources).
      • The frame parameter has been added to various method of the runtime interfaces
        Texture_handler_vtable and Texture_handler_deriv_vtable. A new member m_tex_frame
        to support the intrinsics tex::first_frame() and tex::last_frame() has been added.
      • The examples "DF Native", "DXR", and "Execution Native" have been extended accordingly.
    • Added an overload of IMdl_factory::clone() that allows cloning of an execution context.
      Useful for local changes to the context options.
    • Disabled WEBP export in the FreeImage plugin due to memory access violations.
    • Changed mi::math::gamma_correction() to include the alpha channel, as it is done already in
      other places.
  • MDL Compiler and Backends

    • Added support for libbsdf normal adaption for CUDA and native runtime. The --an option for
      the df_cuda and df_native examples demonstrates the feature (the dummy implementation
      does not change the normal, though).
    • The libbsdf implementations of the functions df::diffuse_reflection_bsdf and
      df::diffuse_transmission_bsdf now compensate for energy loss caused by differences of
      shading and geometric normal.
    • Added frame sequences resolution using frame markers in resources to the MDL core compiler.
    • Added an error message to the JIT backend that is issued if the user specifies
      a state module that does not contain all necessary functions.
    • Removed a redundant call to the entity resolver in the MDL core compiler when
      importing modules.
  • MDL SDK examples

    • Examples Shared
      • All examples load now the dds plugin by default.
    • Example DF Native
      • Added support for custom texture runtime.
    • Example DXR
      • Added a new dependency to the DirectX Shader Compiler, which is optional for Windows SDK
        10.0.20348.0 and later.
      • Write a memory dump file in case an application crash occurs.
      • Added support for the glTF extension "KHR_materials_emissive_strength" to
        the example renderer and to the MDL support module.
    • Example Python Bindings
      • Added many more interface to the Python bindings, e.g., IBaker, ICanvas,
        ICompiled_material, IImage_api, IMdl_Module_builder,
        IPlugin_configuration, and ITile, and extended the examples.

Fixed Bugs

  • General

    • Fixed a bug in mdlm and i18n if the environment variable HOME is not set.
    • Fixed a bug in i18n which caused command MDL search paths other than "SYSTEM" and "USER"
      to get ignored.
    • Fixed IFactory::clone() when dealing with untyped arrays.
    • Fixed IMdl_backend::deserialize_target_code() such that the internal DF texture are no
      longer missing under certain circumstances.
    • Fixed handling of weak imports for MDL < 1.6 if an external entity resolver is set. The
      semantic of weak imports is now handled by the core compiler itself, an external entity
      resolver sees now only absolute or strictly relative module names.
    • Fixed ICompiled_material::get_hash() to take the material slots for surface.emission.mode
      and backface.emission.mode into account. Added enumerators SLOT_SURFACE_EMISSION_MODE and
      SLOT_BACKFACE_EMISSION_MODE to mi::neuraylib::Material_slot. Also added SLOT_FIRST and
      SLOT_LAST to support easier enumeration over all material slots.
    • Fixed a crash with default constructed BSDF measurements during MDL export/MDLE creation.
    • Fixed gamma value of pink 1x1 default textures.
    • Fixed a race condition for accessing global core JIT backend options from
      dif...
Read more

MDL SDK 2021.0.4 (344800.9767): 26 Nov 2021

09 Dec 11:18
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2021.0.4 (344800.9767) binary release
(see https://developer.nvidia.com/mdl-sdk)

Fixed Bugs

  • General

    • Fixed incorrect handling of user-defined type names for structs and enums
      when encoded names were enabled.
  • MDL Compiler and Backends

    • Fixed non-deterministic behavior with sincos calls.

MDL SDK 2021.0.2 (344800.7839): 07 Oct 2021

15 Nov 14:57
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2021.0.2 (344800.7839) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • MDL SDK examples

    • Example DXR
      • Added support for various glTF extensions to the example renderer and the MDL support
        module. The new supported extensions are: KHR_texture_transform,
        KHR_materials_transmission, KHR_materials_sheen, KHR_materials_specular,
        KHR_materials_ior, and KHR_materials_volume.
      • Added support for state::animation_time() when the animation mode is enabled in the
        renderer settings.
      • Added support for volume attenuation to the renderer.
      • Update MaterialX dependency to version 1.38.1.

Fixed Bugs

  • MDL Compiler and Backends

    • Fixed incorrect BSDF evaluation for df::sheen_bsdf with a transmitting "multiscatter"
      BSDF parameter.
    • Fixed df::thin_film implementation for the case material IOR < thin film IOR
      (libbsdf).
    • Creation of compiled materials fails now (instead of crashing) if some internal error
      condition is detected.
  • MDL SDK examples

    • Example DXR
      • Fixed the UV coordinate transformations to match the glTF specification. Now the
        V-coordinate is simply flipped by applying v = 1.0f - v to improve UDIM support.
      • Metallic-roughness texture lookups are fixed and will now be handled strict to the glTF
        specification.

MDL SDK 2021.0.1 (344800.4174): 17 Aug 2021

03 Sep 11:31
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2021.0.1 (344800.4174) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • General

    • Reduced memory usage for DDS textures with subformat BC7.
    • Added a new execution context option "warning" to silence compiler warnings or to promote
      them to errors. See IMdl_execution_context for details.
    • Disabled warnings for deprecated MDL materials and functions by default.
  • MDL Compiler and Backends

    • Reduced compilation times.
    • Updated nvidia::core_definitions with new functionality.
  • MDL SDK examples

    • Example Code Generation
      • Added an option to set number of texture result slots.

Fixed Bugs

  • MDL Compiler and Backends

    • Fixed handling of nvidia::baking annotations.
    • Fixed lambda results handling in single-init mode for non-HLSL.
    • Fixed uncomputed cosine in sheen_bsdf's multiscatter (was broken for a
      transmitting multiscatter component, libbsdf).
    • Improved numerical stability in base::coordinate_projection.
    • Fixed missing color_weighted_layer() inside the transmission analysis.
    • Fixed thin film factor implementation (libbsdf).

MDL SDK 2021 (344800.2052): 01 Jun 2021

04 Jun 10:53
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2021.0 (344800.2052) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • MDL 1.7 Language Specification

    • OpenVDB has been added as supported 3D texture format.
    • Minimum required versions have been added for OpenEXR, Ptex, and OpenVDB to conform to the
      VFX Reference Platform CY2021.
    • Supported texture selector string values have been added for each supported texture format.
    • Texture sequences with a sequence marker have been added to the definition of texture file
      paths.
    • The auto placeholder type specifier has been added for variable declarations and function
      return types.
    • The float type is required to use a 32-bit representation following the IEEE 754 single
      precision standard. Floating point operations for float and double may deviate but shall
      not interrupt nor terminate processing.
    • The int type is required to be a 32-bit signed integer in two's complement form with
      wrap-around operations and without exceptions.
    • The restrictions on the texture types, light profile data type, and measured BSDF data type
      have been removed. They can now be used for local variable types, return types, field types
      in user defined structures, and element type of arrays.
    • A selector string parameter has been added to the texture_2d and texture_3d constructors
      to support texture formats with multiple data sets and channels in a file. The anno::usage
      standard annotation can be used on texture parameters to pre-select selector values in an
      integration.
    • The operators =, ==, and != have been added for the texture types, light profile data
      type, and measured BSDF data type.
    • Emission has been added to the volumetric material properties.
    • The return type of a material definition can have an annotation.
    • The description of various standard annotations, like in_group and ui_order, mention
      their wider applicability to more elements in MDL.
    • The usage standard annotation on materials is recommended to be used on the return type and
      not the material definition to match the recommendation for function declarations.
    • The hyperbolic trigonometric functions cosh, sinh, and tanh have been added to the
      standard math library.
    • The offset functions width_offset, height_offset, and depth_offset have been added to
      give full access to OpenVDB bounding box information.
    • The functions first_frame and last_frame have been added to give access to the texture
      animation bounds.
    • The transform function grid_to_object_space has been added to give access to OpenVDB
      bounding box information in MDL object space.
    • A frame parameter has been added to the width, height, depth, width_offset,
      height_offset, depth_offset, and grid_to_object_space texture functions to select frames
      in texture sequences.
    • A frame parameter has been added to the texture_2d and texture_3d variants of the
      lookup_ltype and texel_ltype family of texture function overloads to select
      frames in texture sequences.
    • The uniform modifier has been removed from the tint parameter of the EDF tint modifier.
    • The VDF tint modifier has been added.
    • An overloaded variant of the directional_factor modifier has been added for EDFs.
    • The sheen_bsdf has been changed to a modifier by adding a BSDF multiscatter parameter.
    • The uniform modifier has been removed from the weight field of the edf_component and
      color_edf_component structures and the upper limit has been removed for the weight.
    • The color_vdf_component structure and VDF overloads for the color_normalized_mix and
      color_clamped_mix mixing distribution functions have been added.
    • The mix distribution functions unbounded_mix and color_unbounded_mix have been added for
      BSDF, EDF, and VDF.
    • An Appendix F has been added defining MDL search path conventions.
  • General

    • The MDL SDK now also supports the ARM platform on Linux (aarch64-linux-gnu).
    • This release changes the naming convention used for the DB elements of modules, material
      definitions, and function definitions. This is necessary to avoid problems that exist with
      the old naming scheme when names contain certain meta-characters. See
      IMdl_configuration::set_encoded_names_enabled() for details. This feature is enabled by
      default.
    • Added the new interface IMdl_module_builder which allows incremental building of new MDL
      modules, as well as editing of existing MDL modules. This interface allows the definition of
      new struct and enum types, and of new functions and materials (including variants). It also
      supports references to previous entities from the same module, explicit control of frequency
      modifiers for parameters, and parameters without defaults. An entity can also be removed from
      a module (if that entity is unreferenced). The new interface can be obtained from
      IMdl_factory::create_module_builder(). See also the new create_module example. The method
      IMdl_factory::create_variants() is deprecated and still available if
      MI_NEURAYLIB_DEPRECATED_12_0 is defined.
    • The API can be configured to treat materials as if they are simply functions with the return
      type material. This means interfaces like IFunction_definition and IFunction_call can
      also be used for materials. See IMdl_configuration::set_materials_are_functions() for
      details. This feature is disabled by default. It will be enabled by default in a future
      release.
    • The new method IMdl_factory::uniform_analysis() allows to check the uniform property of
      an expression graph.
    • Improved performance for loading of MDL modules, in particular parallel loading of modules,
      and reloading of modules.
    • Added force_default_gamma parameter to IMdl_impexp_api::export_canvas() and
      IExport_api::export_canvas() to perform an automatic gamma adjustment based on the pixel
      type chosen for export.
    • The implementation of IFunction_definition::get_thumbnail() and
      IMaterial_definition::get_thumbnail() has been changed to compute the value lazily on
      demand.
    • The system locale used in methods of IMdl_i18n_configuration is restricted to two-letter
      strings to follow ISO 639-1.
    • Reduced lock scope during MDL module loading. This avoids callbacks to the entity resolver
      and related interfaces while holding this lock.
    • Added get_mdl_parameter_type_name(), get_return_type() and get_semantic() on
      IMaterial_definition for consistency with function definition. Likewise, added
      get_return_type() on IMaterial_instance.
    • Added IMdl_impexp_api::get_mdl_module_name() to obtain the MDL module name for a module
      identified by its file name.
    • Added IType_factory::clone() for type lists.
    • Made log messages from plugins available.
    • Updated recommended version numbers and use C++ 17 to meet the requirements for the VFX
      reference platform 2021.
    • A Python binding for the MDL SDK has been added. This binding consists of a shared library
      generated from the API headers using SWIG, and some additional helper functions for ease of
      use. In addition, there is a stub Python module to make that shared library accessible from
      Python code. See "Language Bindings" in the API reference for more information. Examples to
      demonstrate working with the Python binding are included as well.
    • In the API, the array constructor now uses --as all other function definitions-- named
      arguments instead of positional arguments. The previously irrelevant parameter names are now
      enforced to be "0", "1", and so on.
    • Added support for the "target model" compilation mode.
    • Added a context option "remove_dead_parameters" to control the removal of dead
      parameter in instances of ICompiled_materials. Dead parameters only survive if this
      options is set (enabled by default). Setting it to false produces a compatible argument
      block layout independent of the target material mode.
    • Reduced the verbosity of the cmake configuration output.
  • MDL Compiler and Backends

    • Added support for MDL 1.7.
    • The MDL compiler warns now if a literal value would loose precision in a implicit (or
      explicit) conversion.
    • Improved half vector computation for custom-curve/measured-curve layering: assume refraction
      for non-thin-walled materials to loose less energy for non-physical glass materials
      constructed from separate BRDF and BTDF.
    • Protect custom-curve evaluations against cosines > 1 to avoid numerical corner cases.
    • Fixed textures with different gamma modes being reported as one texture in ITarget_code,
      when resource resolving was disabled.
    • Restricted several annotations to real functions (i.e. not materials):
      intrinsic(), throws(), const_expr(), noinline().
    • Slightly improved generated HLSL code: the HLSL optimizer can now fold constructions like
      vector3(a.x, a.y, a.z) into a.
    • Added support for backend option use_renderer_adapt_normal to HLSL backend.
    • Improved speed of the DAG compiler computing material hashes.
    • Added some mathematical identities for math functions in the DAG optimizer.
    • Allowed annotation ui_order() on functions and materials.
    • IMdl_backend::translate_environment() accepts now a function that returns a
      ...
Read more

MDL SDK 2020.1.2 (334300.5582): 12 Nov 2020

17 Nov 11:01
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2020.1.2 (334300.5582) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • MDL Compiler and Backends

    • A new HLSL backend option use_renderer_adapt_microfacet_roughness has been added, which
      allows a renderer to adapt the roughness values provided to microfacet BSDFs right before
      using them. The prototype of the function the renderer has to provide is float2 mdl_adapt_microfacet_roughness(Shading_state_material state, float2 roughness_uv).
    • A new execution context option ignore_noinline has been added, which allows to ignore
      anno::noinline() annotations, enabling inlining when creating a compiled material.
      Previously this happened later when generating code for distribution functions. But
      optimizing at this time could lead to a changed DAG which may not contain the nodes requested
      by the user anymore.

Fixed Bugs

  • General

    • Fixed a crash in the i18n tool when accessing module annotations.
  • MDL Compiler and Backends

    • Fixed wrong optimization for ternary operators selecting different vector elements in HLSL
      always returning the true expression.
    • Fixed wrong PTX version used for sm_86.
    • In single-init mode, don't let a requested geometry.normal expression calculate the normal
      again.
    • Fixed analysis of derivative variants of functions not being recognized as depending on
      state::normal().
    • Reduced number of texture result slots used in generated init functions.
    • Do not generate HLSL code containing min16int to ensure compatibility to Slang.
    • Fixed translation of conversion of an 8-bit to a 32-bit integer for HLSL.

MDL SDK 2020.1.1 (334300.4226): 29 Sep 2020

12 Oct 20:55
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2020.1.1 (334300.4226) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • General

    • Thumbnail paths are now resolved when they are requested. Before, the resolving was done
      during the module loading.
    • A new backend option eval_dag_ternary_strictly has been added, which enables strict
      evaluation of ternary operators (?:) on the DAG to reduce code size. By default it is enabled.
  • MDL Compiler and Backends

    • Added single-init mode for a set of functions added to a link unit, allowing all these
      functions to reuse values calculated in the init function and stored in the texture results
      field of the state struct. To enable this mode, the first path in the target function
      description list given to ILink_unit::add_material() must be "init". (Note: the init
      function will not be marked as ITarget_code::DK_BSDF anymore.)
  • MDL SDK examples

    • Examples Shared

      • Enabled CMake option for linking MSVC dynamic runtime (/MD) instead of static (/MT) by
        default.
    • Example Code Generation

      • Updated MaterialX support to incorporate latest changes from the MaterialX github
        repository (branch 1.3.8).
    • Example DXR

      • Added -e option to specify which expressions to compile.

Fixed Bugs

  • MDL Compiler and Backends

    • Fixed IFunction_call::get_arguments() for the array constructor, such that it always
      uses "0", "1", and so on as argument names.
    • Fixed failing MDLE export if the tex::gamma_mode type is only referenced by an
      annotation.
    • Fixed storing matrices in texture results taking up all the space without much benefit.

MDL SDK 2020.1 (334300.2228): 11 Aug 2020

26 Aug 14:29
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2020.1 (334300.2228) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • MDL 1.6 Language Specification

    • Hyperlinks have been added to the MDL Specification PDF document.
  • General

    • Enabled support for MDL modules whose names contains parentheses, brackets, or commas.
    • The interface IMdl_entity_resolver has been redesigned. Support for resolving resources has
      been added.
    • The new interface IMdl_module_transformer allows to apply certain transformations on MDL
      modules.
    • Various API methods have been added in order to reduce the error-prone parsing of MDL-related
      names: To retrieve DB names from MDL names use get_db_module_name() and
      get_db_definition_name() on IMdl_factory. To retrieve parts of the MDL name from the
      corresponding DB element use get_mdl_package_component_count(),
      get_mdl_package_component_name(), and get_mdl_simple_name() on IModule;
      get_mdl_module_name(), get_mdl_simple_name() on IMaterial_definition; and
      get_mdl_module_name(), get_mdl_simple_name(), and get_mdl_parameter_type_name() on
      IFunction_definition and IAnnotation_definition.
    • Added a new overload of IModule::get_function_overloads() that accepts a simple name
      and an array of parameter type names instead of two strings. This avoids the ambiguity when
      parsing parentheses and commas. The old overload is deprecated and still available if
      MI_NEURAYLIB_DEPRECATED_11_1 is defined.
    • Improved recursive MDL module reloading: changed the traversal order from pre-order to
      post-order traversal, avoid flagging a module as changed if it did not change at all.
    • Improved Definition_wrapper: the creation of functions calls for template-like MDL
      functions requires now an actual argument list since the dummy defaults for such functions
      easily lead to function calls with the wrong types in the signature.
    • Added more options to control the generation of compiled materials in class compilation mode:
      Folding of enum and bool parameters, folding of individual parameters, folding of cutout
      opacity, and folding of transparent layers.
    • Added methods to retrieve the MDL version of modules, and the MDL version when a particular
      function or material definition was added to (and, if applicable, removed from) the MDL
      specification.
    • Added methods to retrieve the MDL system and user paths.
    • The legacy behavior of df::simple_glossy_bsdf can now be controlled via the interface
      IMdl_configuration.
    • The return type of IFunction_definition::get_body() has been changed from
      const IExpression_direct_call* to const IExpression*.
  • MDL Compiler and Backends

    • Added support for target code serialization in the HLSL and PTX backends. See the new
      methods get_backend_kind(), supports_serialization(), serialize(), and
      get_argument_layout_count() on ITarget_code, and
      IMdl_backend::deserialize_target_code(). The new context option
      "serialize_class_instance_data" for ITarget_code::serialize() controls whether
      per-instance data or only per-class data is serialized.
    • Allow total internal reflection for glossy BSDFs with mode df::scatter_transmit (libbsdf).
    • When derivatives are enabled, state::position() is now derivable. Thus, the "position"
      field of Shading_state_material_with_derivs is now a derivative type.
    • Added "meters_per_scene_unit" field to Shading_state_material. It is used, when folding
      of state::meters_per_scene_unit() and state::scene_units_per_meter() has been disabled
      via the new IMdl_execution_context "fold_meters_per_scene_unit" option.
    • Added derivative support for matrices.
    • Added derivative support for scene data functions. Requires new texture runtime functions
      scene_data_lookup_deriv_float, scene_data_lookup_deriv_float2,
      scene_data_lookup_deriv_float3, scene_data_lookup_deriv_float4, and
      scene_data_lookup_deriv_color (see texture_support_cuda.h in the MDL SDK examples
      for the prototypes).
    • Added mi::neuraylib::ICompiled_material::depends_on_uniform_scene_data() analyzing
      whether any scene::data_lookup_uniform_*() functions are called by a material instance.
    • Implemented per function render state usage in ITarget_code.
    • Avoid reporting deprecated warnings, if current entity is already deprecated.
  • MDL SDK examples

    • Examples Shared

      • Added utility headers for strings, enums, I/O, OS, and MDL specific tasks to be used in
        the examples. Updated examples to make use of the new utility headers.
      • Added GUI classes to illustrate MDL parameter editing and to unify user interfaces in
        examples in the future.
    • Example DXR

      • Added a new more structured user interface with various new features including the
        loading of scenes and environments from the menu, the replacement of materials,
        compilation and parameter folding options, and parameter editing in instance compilation
        mode.
      • Integrated the MDL browser (if built) for the replacement of a selected material.
      • Added shader caching to improve loading times (has to be enabled with option
        --enable_shader_cache).
    • GLTF Support

      • Added KHR_materials_clearcoat support, also in Example DXR.
    • MDL plugin for Arnold

      • Added a new example to illustrate the integration of MDL into an existing advanced CPU
        renderer.
    • Example Code Generation

      • Added a new example to illustrate HLSL and PTX code generation.
    • Example OptiX 7

      • Added a new example to illustrate the use MDL code as OptiX callable programs in a
        closest hit shader, and alternatively, how to link the MDL code directly into a
        per-material closest hit shader for better runtime performance.
    • Example Native

      • Added missing scene data functions of custom texture runtime.

Fixed Bugs

  • General

    • Fixed documentation of Bsdf_evaluate_data structs: eval function results are output-only,
      not input/output.
    • Fixed compilation of materials using the array length operator.
    • Fixed crash on CentOS 7.1 when importing non-trivial MDL modules.
    • Fixed incorrect behavior during function call creation when implicit casts were enabled.
  • MDL Compiler and Backends

    • Fixed file resolution during re-export of MDLE modules.
    • Fixed missing clearing of context messages when creating a link unit.
    • Fixed detection of absolute file names on Windows for MDLEs on a network share.
    • Fixed support for the read-only segment and resources inside function bodies when compiling
      for the native target.
    • Fixed rare crash/memory corruption than could occur on MDLE creation.
    • Fixed possible crash when inlining a function containing a for (i = ...) loop statement.
    • Fixed potential crash in the auto importer when imports of the current module are erroneous.
    • Fixed handling of suppressed warnings if notes are attached to them, previously these were
      attached to other messages.
    • Fixed possible crash in generating MDLE when array types are involved.
    • Fixed printing of initializers containing sequence expressions, it is T v = (a,b);, not T v = a, b;.
    • Improved AST optimizer:
      • Write optimized if conditions back.
      • Write optimized sub-expressions of binary expressions back.
      • Handle constant && x, constant || x, x && constant, x || constant.
    • Fixed folding of calls to state::meters_per_scene_unit() and
      state::scene_units_per_meter() in non-inlined functions.
    • Fixed wrong code generation for int to float conversions with derivatives.
    • Fixed a bug in the generated HLSL code that caused wrong calculations because loads were
      erroneously placed after calls modifying memory.
    • Fixed checking of valid MDL identifiers (names starting with "do" were treated as keywords,
      but not "do" itself).
    • Fixed overload resolution for MDL operators.
    • Fixed crash in MDL runtime when using nonexistent image files with MDL.
    • Fixed invalid translation of int to float conversion with derivatives enabled.
    • Fixed broken math::sincos() on vectors.
    • Fixed failing MDLE creation due to several missing or non-exported entities (constants,
      annotations).
    • Fixed failing MDLE creation if the main module was < MDL 1.6, but imported an MDL 1.6 module.
    • Fixed failing MDLE creation if non-absolute imports of ::base were used.
    • Fixed rare crashes occurring when the array constructor is used in annotations.
    • Fixed lost enumeration of BSDF data textures used by the libbsdf multiscatter.
  • MDL SDK examples

    • Examples Shared
      • Fixed failing CUDA checks when minimizing application.

MDL SDK 2020.0.2 (327300.6313): 28 May 2020

17 Jun 18:10
Compare
Choose a tag to compare

ABI compatible with the MDL SDK 2020.0.2 (327300.6313) binary release
(see https://developer.nvidia.com/mdl-sdk)

Added and Changed Features

  • MDL Compiler and Backends

    • Reduced the minimum roughness threshold for microfacet BSDFs from 1e-3 to 1e-7 to
      make them usable for mirrors and clear glass, which is inefficient but could be required by
      ubershaders.
    • Added "ro_data_segment" field to Shading_state_environment ("ro_data_segment_offset" for
      HLSL).
    • Use "direction" for the field name of Shading_state_environment (HLSL only).
    • Made state::position() derivable.

Fixed Bugs

  • MDL Compiler and Backends

    • Fixed some rare cases were resources inside MDL functions got lost.
    • Fixed crash in MDL code generators due to MDL core compiler missing some error messages when
      a (wrong) member selection has the same name like an enum constant.
    • Fixed rare NaN in microfacet sampling.
    • Fixed error value of ITarget_code::get_body_*() functions.
    • Fixed return value of ITarget_code::create_argument_block() when required resource callback
      is missing.
    • Fixed read-only data segment data not being set for native lambdas.
    • Fixed resource enumeration when compiling multiple expressions in a link unit with
      add_material(): ensure that resources in material bodies are enumerated first.