MDL SDK API nvidia_logo_transpbg.gif Up
imdl_backend_api.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2025 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IMDL_BACKEND_API_H
8#define MI_NEURAYLIB_IMDL_BACKEND_API_H
9
11
12namespace mi {
13
14namespace neuraylib {
15
16class IMdl_backend;
17
38 DFK_NONE,
39 DFK_INVALID,
40 DFK_SIMPLE_GLOSSY_MULTISCATTER,
41 DFK_BACKSCATTERING_GLOSSY_MULTISCATTER,
42 DFK_BECKMANN_SMITH_MULTISCATTER,
43 DFK_BECKMANN_VC_MULTISCATTER,
44 DFK_GGX_SMITH_MULTISCATTER,
45 DFK_GGX_VC_MULTISCATTER,
46 DFK_WARD_GEISLER_MORODER_MULTISCATTER,
47 DFK_SHEEN_MULTISCATTER,
48 DFK_MICROFLAKE_SHEEN_GENERAL,
49 DFK_MICROFLAKE_SHEEN_MULTISCATTER,
50 DFK_FORCE_32_BIT = 0xffffffffU
51};
52
53mi_static_assert(sizeof(Df_data_kind) == sizeof(Uint32));
54
56class IMdl_backend_api : public
57 mi::base::Interface_declare<0x425559dd,0xbf91,0x459a,0xaa,0xaf,0xc3,0x14,0x8a,0x5a,0x2f,0x99>
58{
59public:
60
68 MB_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only
69 };
70
77
79
90 Df_data_kind kind,
91 Size &rx,
92 Size &ry,
93 Size &rz,
94 const char *&pixel_type) const = 0;
95};
96 // end group mi_neuray_mdl_misc
98
99} // namespace neuraylib
100
101} // namespace mi
102
103#endif // MI_NEURAYLIB_IMDL_BACKEND_API_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
This interface can be used to obtain the MDL backends.
Definition: imdl_backend_api.h:58
virtual const Float32 * get_df_data_texture(Df_data_kind kind, Size &rx, Size &ry, Size &rz, const char *&pixel_type) const =0
Returns the distribution function data of the texture identified by kind.
Mdl_backend_kind
Currently available MDL backends.
Definition: imdl_backend_api.h:62
@ MB_NATIVE
Generate native code.
Definition: imdl_backend_api.h:66
@ MB_CUDA_PTX
Generate CUDA PTX code.
Definition: imdl_backend_api.h:63
@ MB_LLVM_IR
Generate LLVM IR (LLVM 12.0 compatible).
Definition: imdl_backend_api.h:64
@ MB_GLSL
Generate GLSL code.
Definition: imdl_backend_api.h:65
@ MB_HLSL
Generate HLSL code.
Definition: imdl_backend_api.h:67
virtual IMdl_backend * get_backend(Mdl_backend_kind kind)=0
Returns an MDL backend generator.
MDL backends allow to transform compiled material instances or function calls into target code.
Definition: imdl_backend.h:40
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:58
float Float32
32-bit float.
Definition: types.h:51
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Df_data_kind
Possible kinds of distribution function data.
Definition: imdl_backend_api.h:37
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5