PyMaterialXGenShader.GenOptions

class GenOptions

Bases: pybind11_object

Class holding options to configure shader generation.

See:

https://materialx.org/docs/api/class_gen_options.html

Methods

__init__(self)

Properties

addUpstreamDependencies

(bool) Sets whether to include upstream dependencies for the element to generate a shader for.

emitColorTransforms

(bool) Enable emitting colorspace transform code if a color management system is defined. Defaults to True.

fileTextureVerticalFlip

(bool) If True the y-component of texture coordinates used for sampling file textures will be flipped before sampling. This can be used if file textures need to be flipped vertically to match the target’s texture space convention. By default this option is False.

hwAmbientOcclusion

(bool) Enables ambient occlusion rendering for HW shader targets. Defaults to False.

hwImplicitBitangents

(bool) Calculate fallback bitangents from existing normals and tangents inside the bitangent node.

hwMaxActiveLightSources

(int) Sets the maximum number of light sources that can be active at once.

hwNormalizeUdimTexCoords

(bool) Sets whether to transform texture coordinates to normalize uv space when UDIMs images are bound to an image. Can be enabled for when texture atlas generation is performed to compress a set of UDIMs into a single normalized image for hardware rendering.

hwShadowMap

(bool) Enables shadow mapping for HW shader targets. Defaults to False.

hwSpecularEnvironmentMethod

(HwSpecularEnvironmentMethod) Sets the method to use for specular environment lighting for HW shader targets.

hwSrgbEncodeOutput

(bool) Enables an sRGB encoding for the color output on HW shader targets. Defaults to False.

hwTransparency

(bool) Sets if transparency is needed or not for HW shaders. If a surface shader has potential of being transparent this must be set to True, otherwise no transparency code fragments will be generated for the shader and the surface will be fully opaque.

hwWriteAlbedoTable

(bool) Enables the writing of a directional albedo table. Defaults to False.

hwWriteDepthMoments

(bool) Enables the writing of depth moments for HW shader targets. Defaults to False.

hwWriteEnvPrefilter

(bool) Enables the generation of a prefiltered environment map. Defaults to False.

libraryPrefix

(str) The standard library prefix, which will be applied to calls to emitLibraryInclude() during code generation. Defaults to 'libraries'.

shaderInterfaceType

(ShaderInterfaceType) Sets the type of shader interface to be generated.

targetColorSpaceOverride

(str) An optional override for the target color space. Shader fragments will be generated to transform input values and textures into this color space.

targetDistanceUnit

(str) Define the target distance unit. Shader fragments will be generated to transform input distance values to the given unit.

Methods

__init__(self: GenOptions) None