MaterialX.PyMaterialXGenGlsl Module

Inheritance diagram of MaterialX.PyMaterialXGenGlsl

Shader generation using the OpenGL Shading Language.

class MaterialX.PyMaterialXGenGlsl.EsslShaderGenerator

Bases: GlslShaderGenerator

An ESSL (OpenGL ES Shading Language) shader generator.

static create() MaterialX.PyMaterialXGenShader.ShaderGenerator
bindLightShader(self: MaterialX.PyMaterialXCore.NodeDef, arg0: SupportsInt, arg1: MaterialX.PyMaterialXGenShader.GenContext) None
generate(self: MaterialX.PyMaterialXGenGlsl.EsslShaderGenerator, arg0: str, arg1: MaterialX.PyMaterialXCore.Element, arg2: MaterialX.PyMaterialXGenShader.GenContext) MaterialX.PyMaterialXGenShader.Shader
getColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX.PyMaterialXGenShader.ColorManagementSystem

Returns the color management system.

getTarget(self: MaterialX.PyMaterialXGenGlsl.EsslShaderGenerator) str

Return a unique identifier for the target this generator is for.

getTokenSubstitutions(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) dict[str, str]

Return the map of token substitutions used by the generator.

getUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX_v1_39_5::UnitSystem

Returns the unit system.

getVersion(self: MaterialX.PyMaterialXGenGlsl.EsslShaderGenerator) str

Return the version string for the ESSL version this generator is for.

registerShaderMetadata(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document, arg1: MaterialX_v1_39_5::GenContext) None

Register metadata that should be exported to the generated shaders.

Supported metadata includes standard UI attributes like “uiname”, “uifolder”, “uimin”, “uimax”, etc. But it is also extendable by defining custom attributes using AttributeDefs. Any AttributeDef in the given document with exportable=”true” will be exported as shader metadata when found on nodes during shader generation. Derived shader generators may override this method to change the registration. Applications must explicitly call this method before shader generation to enable export of metadata.

registerTypeDefs(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document) None

Register type definitions from the document.

setColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXGenShader.ColorManagementSystem) None

Sets the color management system.

setUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX_v1_39_5::UnitSystem) None

Sets the unit system.

unbindLightShader(self: SupportsInt, arg0: MaterialX.PyMaterialXGenShader.GenContext) None
unbindLightShaders(self: MaterialX.PyMaterialXGenShader.GenContext) None
class MaterialX.PyMaterialXGenGlsl.GlslResourceBindingContext(self: MaterialX.PyMaterialXGenGlsl.GlslResourceBindingContext, arg0: SupportsInt, arg1: SupportsInt)

Bases: HwResourceBindingContext

Class representing a resource binding for Glsl shader resources.

static create(arg0: SupportsInt, arg1: SupportsInt) MaterialX.PyMaterialXGenGlsl.GlslResourceBindingContext
emitDirectives(self: MaterialX.PyMaterialXGenGlsl.GlslResourceBindingContext, arg0: MaterialX.PyMaterialXGenShader.GenContext, arg1: MaterialX.PyMaterialXGenShader.ShaderStage) None
emitResourceBindings(self: MaterialX.PyMaterialXGenGlsl.GlslResourceBindingContext, arg0: MaterialX.PyMaterialXGenShader.GenContext, arg1: MaterialX.PyMaterialXGenShader.VariableBlock, arg2: MaterialX.PyMaterialXGenShader.ShaderStage) None
getSelf(self: MaterialX.PyMaterialXGenShader.GenUserData) MaterialX.PyMaterialXGenShader.GenUserData
class MaterialX.PyMaterialXGenGlsl.GlslShaderGenerator

Bases: HwShaderGenerator

Base class for GLSL (OpenGL Shading Language) code generation.

A generator for a specific GLSL target should be derived from this class.

static create() MaterialX.PyMaterialXGenShader.ShaderGenerator
bindLightShader(self: MaterialX.PyMaterialXCore.NodeDef, arg0: SupportsInt, arg1: MaterialX.PyMaterialXGenShader.GenContext) None
generate(self: MaterialX.PyMaterialXGenGlsl.GlslShaderGenerator, arg0: str, arg1: MaterialX.PyMaterialXCore.Element, arg2: MaterialX.PyMaterialXGenShader.GenContext) MaterialX.PyMaterialXGenShader.Shader

Generate a shader starting from the given element, translating the element and all dependencies upstream into shader code.

getColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX.PyMaterialXGenShader.ColorManagementSystem

Returns the color management system.

getTarget(self: MaterialX.PyMaterialXGenGlsl.GlslShaderGenerator) str

Return a unique identifier for the target this generator is for.

getTokenSubstitutions(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) dict[str, str]

Return the map of token substitutions used by the generator.

getUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX_v1_39_5::UnitSystem

Returns the unit system.

getVersion(self: MaterialX.PyMaterialXGenGlsl.GlslShaderGenerator) str

Return the version string for the GLSL version this generator is for.

registerShaderMetadata(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document, arg1: MaterialX_v1_39_5::GenContext) None

Register metadata that should be exported to the generated shaders.

Supported metadata includes standard UI attributes like “uiname”, “uifolder”, “uimin”, “uimax”, etc. But it is also extendable by defining custom attributes using AttributeDefs. Any AttributeDef in the given document with exportable=”true” will be exported as shader metadata when found on nodes during shader generation. Derived shader generators may override this method to change the registration. Applications must explicitly call this method before shader generation to enable export of metadata.

registerTypeDefs(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document) None

Register type definitions from the document.

setColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXGenShader.ColorManagementSystem) None

Sets the color management system.

setUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX_v1_39_5::UnitSystem) None

Sets the unit system.

unbindLightShader(self: SupportsInt, arg0: MaterialX.PyMaterialXGenShader.GenContext) None
unbindLightShaders(self: MaterialX.PyMaterialXGenShader.GenContext) None
class MaterialX.PyMaterialXGenGlsl.VkShaderGenerator

Bases: GlslShaderGenerator

A Vulkan GLSL shader generator.

static create() MaterialX.PyMaterialXGenShader.ShaderGenerator
bindLightShader(self: MaterialX.PyMaterialXCore.NodeDef, arg0: SupportsInt, arg1: MaterialX.PyMaterialXGenShader.GenContext) None
generate(self: MaterialX.PyMaterialXGenGlsl.VkShaderGenerator, arg0: str, arg1: MaterialX.PyMaterialXCore.Element, arg2: MaterialX.PyMaterialXGenShader.GenContext) MaterialX.PyMaterialXGenShader.Shader
getColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX.PyMaterialXGenShader.ColorManagementSystem

Returns the color management system.

getTarget(self: MaterialX.PyMaterialXGenGlsl.VkShaderGenerator) str

Return a unique identifier for the target this generator is for.

getTokenSubstitutions(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) dict[str, str]

Return the map of token substitutions used by the generator.

getUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX_v1_39_5::UnitSystem

Returns the unit system.

getVersion(self: MaterialX.PyMaterialXGenGlsl.VkShaderGenerator) str

Return the version string for the GLSL version this generator is for.

registerShaderMetadata(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document, arg1: MaterialX_v1_39_5::GenContext) None

Register metadata that should be exported to the generated shaders.

Supported metadata includes standard UI attributes like “uiname”, “uifolder”, “uimin”, “uimax”, etc. But it is also extendable by defining custom attributes using AttributeDefs. Any AttributeDef in the given document with exportable=”true” will be exported as shader metadata when found on nodes during shader generation. Derived shader generators may override this method to change the registration. Applications must explicitly call this method before shader generation to enable export of metadata.

registerTypeDefs(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document) None

Register type definitions from the document.

setColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXGenShader.ColorManagementSystem) None

Sets the color management system.

setUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX_v1_39_5::UnitSystem) None

Sets the unit system.

unbindLightShader(self: SupportsInt, arg0: MaterialX.PyMaterialXGenShader.GenContext) None
unbindLightShaders(self: MaterialX.PyMaterialXGenShader.GenContext) None
class MaterialX.PyMaterialXGenGlsl.WgslShaderGenerator

Bases: GlslShaderGenerator

WGSL Flavor of Vulkan GLSL shader generator.

static create() MaterialX.PyMaterialXGenShader.ShaderGenerator
bindLightShader(self: MaterialX.PyMaterialXCore.NodeDef, arg0: SupportsInt, arg1: MaterialX.PyMaterialXGenShader.GenContext) None
generate(self: MaterialX.PyMaterialXGenGlsl.WgslShaderGenerator, arg0: str, arg1: MaterialX.PyMaterialXCore.Element, arg2: MaterialX.PyMaterialXGenShader.GenContext) MaterialX.PyMaterialXGenShader.Shader
getColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX.PyMaterialXGenShader.ColorManagementSystem

Returns the color management system.

getTarget(self: MaterialX.PyMaterialXGenGlsl.WgslShaderGenerator) str
getTokenSubstitutions(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) dict[str, str]

Return the map of token substitutions used by the generator.

getUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator) MaterialX_v1_39_5::UnitSystem

Returns the unit system.

getVersion(self: MaterialX.PyMaterialXGenGlsl.WgslShaderGenerator) str
registerShaderMetadata(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document, arg1: MaterialX_v1_39_5::GenContext) None

Register metadata that should be exported to the generated shaders.

Supported metadata includes standard UI attributes like “uiname”, “uifolder”, “uimin”, “uimax”, etc. But it is also extendable by defining custom attributes using AttributeDefs. Any AttributeDef in the given document with exportable=”true” will be exported as shader metadata when found on nodes during shader generation. Derived shader generators may override this method to change the registration. Applications must explicitly call this method before shader generation to enable export of metadata.

registerTypeDefs(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXCore.Document) None

Register type definitions from the document.

setColorManagementSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX.PyMaterialXGenShader.ColorManagementSystem) None

Sets the color management system.

setUnitSystem(self: MaterialX.PyMaterialXGenShader.ShaderGenerator, arg0: MaterialX_v1_39_5::UnitSystem) None

Sets the unit system.

unbindLightShader(self: SupportsInt, arg0: MaterialX.PyMaterialXGenShader.GenContext) None
unbindLightShaders(self: MaterialX.PyMaterialXGenShader.GenContext) None