The MDL environment state structure inside the MDL SDK is a representation of the renderer state in the context of an environment lookup as defined in section 19 "Renderer state" in the MDL specification. More...
#include <target_code_types.h>
Public Attributes | |
tct_float3 | direction |
The result of state::direction(). More... | |
char const * | ro_data_segment |
A pointer to a read-only data segment. More... | |
The MDL environment state structure inside the MDL SDK is a representation of the renderer state in the context of an environment lookup as defined in section 19 "Renderer state" in the MDL specification.
It is used to make the state of the renderer (like the evaluation direction for the environment) available to the generated code.
All spatial values in this structure, i.e. scales, vectors, points and normals, have to be given in internal space (see section 19.2 "Coordinate space transformations" in the MDL specification for more information about the internal space). You can choose the meaning of internal space by setting the "internal_space"
option via the mi::neuraylib::IMdl_backend::set_option() method to "world"
or "object"
. The default is world space.
tct_float3 mi::neuraylib::Shading_state_environment::direction |
The result of state::direction().
It represents the lookup direction for the environment lookup.
char const* mi::neuraylib::Shading_state_environment::ro_data_segment |
A pointer to a read-only data segment.
For "PTX", "LLVM-IR" and "native" JIT backend:
"enable_ro_segment"
option to "on"
via the mi::neuraylib::IMdl_backend::set_option() method. Then, data of arrays larger than 1024 bytes will be stored in a read-only data segment, which is accessible as the first segment (index 0) returned by mi::neuraylib::ITarget_code::get_ro_data_segment_data(). The generated code will expect, that you make this data available via the ro_data_segment
field of the MDL material state. Depending on the target platform this may require copying the data to the GPU.For other backends, this should be NULL
.