7#ifndef MI_NEURAYLIB_IMDL_DISTILLER_H
8#define MI_NEURAYLIB_IMDL_DISTILLER_H
21class ICompiled_material;
39 BAKER_RESOURCE_FORCE_32_BIT = 0xffffffffU
46 mi::base::Interface_declare<0x074709ef,0x11b0,0x4196,0x82,0x1c,0xab,0x64,0x1a,0xa2,0x50,0xdb>
176 const IMap* distiller_options =
nullptr,
177 Sint32* errors =
nullptr)
const = 0;
202 Uint32 gpu_device_id = 0)
const = 0;
276 mi::base::Interface_declare<0x4dba1b1d,0x8fce,0x43d9,0x80,0xa7,0xa2,0x24,0xf3,0x1e,0xdc,0xe7>
335 Uint32 samples)
const = 0;
337#ifdef MI_NEURAYLIB_DEPRECATED_15_1
346 return bake_texture( texture, min_u, max_u, min_v, max_v, 0.0f, samples);
429 Uint32 samples)
const = 0;
This interface is the base interface of all types.
Definition: idata.h:297
This interface represents maps, i.e., a key-value based data structure.
Definition: imap.h:41
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Allows to bake a varying or uniform expression of a compiled material into a texture or constant.
Definition: imdl_distiller_api.h:277
virtual bool is_uniform() const =0
Indicates whether the expression to be baked is uniform or varying.
virtual const char * get_type_name() const =0
Returns the required type name for constants.
virtual Sint32 bake_texture(ICanvas *texture, Float32 min_u, Float32 max_u, Float32 min_v, Float32 max_v, Float32 animation_time, Uint32 samples) const =0
Bakes the expression as texture (supports UV ranges and animated textures).
virtual const char * get_pixel_type() const =0
Returns the pixel type that matches the expression to be baked best.
virtual Sint32 bake_texture_with_constant_detection(ICanvas *texture, IData *constant, bool &is_constant, Uint32 samples) const =0
Bakes the expression as texture (supports detection of constants).
virtual Sint32 bake_texture(ICanvas *texture, Uint32 samples=1) const =0
Bakes the expression as texture.
virtual Sint32 bake_texture_with_constant_detection(ICanvas *texture, IData *constant, bool &is_constant, Float32 min_u, Float32 max_u, Float32 min_v, Float32 max_v, Float32 animation_time, Uint32 samples) const =0
Bakes the expression as texture (supports detection of constants, and UV ranges and animated textures...
virtual Sint32 bake_constant(IData *constant, Uint32 samples=1) const =0
Bakes the expression as constant.
Abstract interface for a canvas represented by a rectangular array of tiles.
Definition: icanvas.h:89
This interface represents a compiled material.
Definition: icompiled_material.h:97
Provides access to various functionality related to MDL distilling.
Definition: imdl_distiller_api.h:47
virtual const char * get_target_name(Size index) const =0
Returns the index -th target name supported for distilling, or nullptr if index is out of bounds.
virtual const char * get_required_module_code(const char *target, Size index) const =0
Returns the MDL source code of the required MDL module with the given index for the given target.
virtual ICompiled_material * distill_material(const ICompiled_material *material, const char *target, const IMap *distiller_options=nullptr, Sint32 *errors=nullptr) const =0
Distills a material.
virtual Size get_target_count() const =0
Returns the number of targets supported for distilling.
virtual Size get_required_module_count(const char *target) const =0
Returns the number of required MDL modules for the given target.
virtual const IBaker * create_baker(const ICompiled_material *material, const char *path, Baker_resource resource=BAKE_ON_CPU, Uint32 gpu_device_id=0) const =0
Creates a baker for texture baking.
virtual const char * get_required_module_name(const char *target, Size index) const =0
Returns the MDL name of the required MDL module with the given index for the given target.
#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
int Sint32
32-bit signed integer.
Definition: types.h:46
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
Baker_resource
Identifies the resource(s) to be used by a baker.
Definition: imdl_distiller_api.h:30
@ BAKE_ON_CPU
Use only the CPU for texture baking.
Definition: imdl_distiller_api.h:33
@ BAKE_ON_GPU_WITH_CPU_FALLBACK
Prefer using the GPU for texture baking, use the CPU as fallback.
Definition: imdl_distiller_api.h:37
@ BAKE_ON_GPU
Use only the GPU for texture baking.
Definition: imdl_distiller_api.h:35
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5