Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.IMaterial

The IMaterial graph node interface.

Material nodes hold common rendering parameters that cannot be controlled via GPU shader programs or fixed function programs, such as e.g. depth and stencil buffer access modes and actions, or different blend modes and blend equations.

A material must always refer to exactly one Graph::IProgram, which is used to calculate actual per-pixel color values.

Use the Graph::IStateSlot base interface to set or get the material slot index this material is temporarily attached to if any children are present.

See sceneGraphStatesSlotsUnits for an overview of state handling during scene graph traversal.
See Graph::IMaterialState for activating a material for rendering. See Graph::IProgram for defining GPU programs to refer to. See Graph::IParameters for defining actual program parameters.


Table members

Inherited


Murl.Graph.IStateSlot

Methods


GetNodeInterface()

Get the constant Graph::INode interface. This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Murl.Graph.INode GetNodeInterface()

Returns
Murl.Graph.INode The constant Graph::INode interface, or null if not available

GetSubMaterialNodeTarget()

Get the constant container holding the optional child materials. This method returns a constant pointer to the node's Graph::IMaterialNodeTarget sub container, which is used to store multiple sub-materials.

Murl.Graph.IGenericNodeTarget.GraphIMaterial GetSubMaterialNodeTarget()

Returns
Murl.Graph.IGenericNodeTarget.GraphIMaterial The constant Graph::IMaterialNodeTarget container, or null if not available.

GetProgramNodeTarget()

Get the constant Graph::IProgramNodeTarget container. This method returns a constant pointer to the node's Graph::IProgramNodeTarget container, which allows to query the program object used with this material.

Murl.Graph.IGenericNodeTarget.GraphIProgram GetProgramNodeTarget()

Returns
Murl.Graph.IGenericNodeTarget.GraphIProgram The mutable Graph::IProgramNodeTarget container, or null if not available.

SetVisibleFaces(faces)

Set which faces of a triangle are visible for rendering.

Boolean SetVisibleFaces(Murl.IEnums.PolygonFaces faces)

Parameters
facesOne of the available IEnums::PolygonFaces enumeration values.
Returns
Boolean true if successful.

GetVisibleFaces()

Check which faces of a triangle are visible for rendering.

Murl.IEnums.PolygonFaces GetVisibleFaces()

Returns
Murl.IEnums.PolygonFaces One of the available IEnums::PolygonFaces enumeration values.

SetColorBufferMode(mode)

Set the material's color buffer access mode. The color buffer access mode can be set to either IEnums::COLOR_BUFFER_MODE_WRITE_ONLY to enable writing to the color buffer, or IEnums::COLOR_BUFFER_MODE_NONE to disable color output. Use SetColorBufferMask() to enable/disable specific color channels when writing is enabled.

Boolean SetColorBufferMode(Murl.IEnums.ColorBufferMode mode)

Parameters
modeThe color buffer access mode.
Returns
Boolean true if successful.

GetColorBufferMode()

Get the material's color buffer access mode.

Murl.IEnums.ColorBufferMode GetColorBufferMode()

Returns
Murl.IEnums.ColorBufferMode The color buffer access mode.

SetColorBufferMask(mask)

Set the material's color buffer mask. If color buffer writes are enabled, and a specific bit is set in the given mask, the respective color channel is enabled for writing, otherwise that channel is not written to the output pixels. To generally enable/disable color buffer writes, use SetColorBufferMode().

Boolean SetColorBufferMask(Integer mask)

Parameters
maskThe color buffer write mask.
Returns
Boolean true if successful.

GetColorBufferMask()

Get the material's color buffer mask.

Integer GetColorBufferMask()

Returns
Integer The color buffer write mask.

SetDepthBufferMode(mode)

Set the material's depth buffer access mode. The depth buffer access mode can be set to enable/disable both depth buffer reads and writes, through one of the available IEnums::DepthBufferMode values.

Boolean SetDepthBufferMode(Murl.IEnums.DepthBufferMode mode)

Parameters
modeThe depth buffer access mode.
Returns
Boolean true if successful.

GetDepthBufferMode()

Get the material's depth buffer access mode.

Murl.IEnums.DepthBufferMode GetDepthBufferMode()

Returns
Murl.IEnums.DepthBufferMode The depth buffer access mode.

SetDepthBufferMask(mask)

Set the material's depth buffer mask. This method can be used to independently enable/disable depth buffer writes in addition to the general depth buffer access mode set via SetDepthBufferMode().

Boolean SetDepthBufferMask(Integer mask)

Parameters
maskThe depth buffer write mask.
Returns
Boolean true if successful.

GetDepthBufferMask()

Get the material's depth buffer mask.

Integer GetDepthBufferMask()

Returns
Integer The depth buffer write mask.

SetDepthTestFunction(function)

Set the material's depth test function. If the material's depth buffer access mode is set to either IEnums::DEPTH_BUFFER_MODE_READ_ONLY or IEnums::DEPTH_BUFFER_MODE_READ_AND_WRITE, the given function is used for all depth buffer comparisons using this material. The output pixel is only written if the result of its depth comparison is true using the given function.

Boolean SetDepthTestFunction(Murl.IEnums.DepthTestFunction function)

Parameters
functionThe depth test function.
Returns
Boolean true if successful.

GetDepthTestFunction()

Get the material's depth test function.

Murl.IEnums.DepthTestFunction GetDepthTestFunction()

Returns
Murl.IEnums.DepthTestFunction The depth test function.

SetStencilBufferMode(mode)

Set the material's stencil buffer access mode. The stencil buffer access mode can be set to enable/disable both stencil buffer reads and writes, through one of the available IEnums::StencilBufferMode values.

Boolean SetStencilBufferMode(Murl.IEnums.StencilBufferMode mode)

Parameters
modeThe stencil buffer access mode.
Returns
Boolean true if successful.

GetStencilBufferMode()

Get the material's stencil buffer access mode.

Murl.IEnums.StencilBufferMode GetStencilBufferMode()

Returns
Murl.IEnums.StencilBufferMode The stencil buffer access mode.

SetStencilBufferMask(mask)

Set the material's stencil buffer mask. If stencil buffer writes are enabled, and a specific bit is set in the given mask, the respective stencil bit is enabled for writing, otherwise that bit is not written to the output pixels. To generally enable/disable stencil buffer writes, use SetStencilBufferMode().

Boolean SetStencilBufferMask(Integer mask)

Parameters
maskThe stencil buffer write mask.
Returns
Boolean true if successful.

GetStencilBufferMask()

Get the material's stencil buffer mask.

Integer GetStencilBufferMask()

Returns
Integer The stencil buffer write mask.

SetStencilTestFunction(frontFunction, backFunction)

Set the material's stencil test functions. If the material's stencil buffer access mode is set to either IEnums::STENCIL_BUFFER_MODE_READ_ONLY or IEnums::STENCIL_BUFFER_MODE_READ_AND_WRITE, the given functions are used for all stencil buffer comparisons using this material. The output pixel is only written if the result of its stencil comparison is true using the given function.

Boolean SetStencilTestFunction(Murl.IEnums.StencilTestFunction frontFunction, Murl.IEnums.StencilTestFunction backFunction)

Parameters
frontFunctionThe stencil test function used for front-facing primitives.
backFunctionThe stencil test function used for back-facing primitives.
Returns
Boolean true if successful.

GetFrontStencilTestFunction()

Set the material's stencil test function for front-facing primitives.

Murl.IEnums.StencilTestFunction GetFrontStencilTestFunction()

Returns
Murl.IEnums.StencilTestFunction The stencil test function.

GetBackStencilTestFunction()

Set the material's stencil test function for back-facing primitives.

Murl.IEnums.StencilTestFunction GetBackStencilTestFunction()

Returns
Murl.IEnums.StencilTestFunction The stencil test function.

SetStencilTestReferenceValue(frontValue, backValue)

Set the material's stencil test reference values. If stencil test is enabled (see SetStencilBufferMode()), the values given represent the actual reference values used for the per-pixel stencil test with the respective functions specified via SetStencilTestFunction(). In addition, before each comparison, both test value and reference value are ANDed with the test mask given via SetStencilTestMask().

Boolean SetStencilTestReferenceValue(Integer frontValue, Integer backValue)

Parameters
frontValueThe reference value used for comparing pixels of front-facing primitives.
backValueThe reference value used for comparing pixels of back-facing primitives.
Returns
Boolean true if successful.

GetFrontStencilTestReferenceValue()

Get the material's stencil test reference value for testing front-facing primitives.

Integer GetFrontStencilTestReferenceValue()

Returns
Integer The stencil test reference value.

GetBackStencilTestReferenceValue()

Get the material's stencil test reference value for testing back-facing primitives.

Integer GetBackStencilTestReferenceValue()

Returns
Integer The stencil test reference value.

SetStencilTestMask(frontMask, backMask)

Set the material's stencil test masks. See SetStencilTestReferenceValue().

Boolean SetStencilTestMask(Integer frontMask, Integer backMask)

Parameters
frontMaskThe comparison mask for front-facing primitives.
backMaskThe comparison mask for back-facing primitives.
Returns
Boolean true if successful.

GetFrontStencilTestMask()

Get the material's stencil test mask for front-facing primitives.

Integer GetFrontStencilTestMask()

Returns
Integer The stencil test mask.

GetBackStencilTestMask()

Get the material's stencil test mask for back-facing primitives.

Integer GetBackStencilTestMask()

Returns
Integer The stencil test mask.

SetStencilBufferActionForFailedStencilTest(frontAction, backAction)

Set the actions to be performed if the stencil test fails. If stencil test is enabled (see SetStencilBufferMode()), the given actions specify how the stencil buffer is modified whenever the stencil test fails for a pixel.

Boolean SetStencilBufferActionForFailedStencilTest(Murl.IEnums.StencilBufferAction frontAction, Murl.IEnums.StencilBufferAction backAction)

Parameters
frontActionThe action to perform for front-facing primitives.
backActionThe action to perform for back-facing primitives.
Returns
Boolean true if successful.

GetFrontStencilBufferActionForFailedStencilTest()

Get the front-facing primitive stencil buffer action for failed stencil tests.

Murl.IEnums.StencilBufferAction GetFrontStencilBufferActionForFailedStencilTest()

Returns
Murl.IEnums.StencilBufferAction The stencil buffer action.

GetBackStencilBufferActionForFailedStencilTest()

Get the back-facing primitive stencil buffer action for failed stencil tests.

Murl.IEnums.StencilBufferAction GetBackStencilBufferActionForFailedStencilTest()

Returns
Murl.IEnums.StencilBufferAction The stencil buffer action.

SetStencilBufferActionForFailedDepthTest(frontAction, backAction)

Set the actions to be performed if the stencil test passes, but the depth test fails. If stencil test is enabled (see SetStencilBufferMode()), the given actions specify how the stencil buffer is modified whenever the depth test fails for a pixel (after successfully passing the stencil test).

Boolean SetStencilBufferActionForFailedDepthTest(Murl.IEnums.StencilBufferAction frontAction, Murl.IEnums.StencilBufferAction backAction)

Parameters
frontActionThe action to perform for front-facing primitives.
backActionThe action to perform for back-facing primitives.
Returns
Boolean true if successful.

GetFrontStencilBufferActionForFailedDepthTest()

Get the front-facing primitive stencil buffer action for failed depth tests.

Murl.IEnums.StencilBufferAction GetFrontStencilBufferActionForFailedDepthTest()

Returns
Murl.IEnums.StencilBufferAction The stencil buffer action.

GetBackStencilBufferActionForFailedDepthTest()

Get the back-facing primitive stencil buffer action for failed depth tests.

Murl.IEnums.StencilBufferAction GetBackStencilBufferActionForFailedDepthTest()

Returns
Murl.IEnums.StencilBufferAction The stencil buffer action.

SetStencilBufferActionForPassedDepthTest(frontAction, backAction)

Set the actions to be performed if both the stencil test and the depth test pass. If stencil test is enabled (see SetStencilBufferMode()), the given actions specify how the stencil buffer is modified whenever both stencil and depth test succeed for a pixel.

Boolean SetStencilBufferActionForPassedDepthTest(Murl.IEnums.StencilBufferAction frontAction, Murl.IEnums.StencilBufferAction backAction)

Parameters
frontActionThe action to perform for front-facing primitives.
backActionThe action to perform for back-facing primitives.
Returns
Boolean true if successful.

GetFrontStencilBufferActionForPassedDepthTest()

Get the front-facing primitive stencil buffer action for passed depth tests.

Murl.IEnums.StencilBufferAction GetFrontStencilBufferActionForPassedDepthTest()

Returns
Murl.IEnums.StencilBufferAction The stencil buffer action.

GetBackStencilBufferActionForPassedDepthTest()

Get the back-facing primitive stencil buffer action for passed depth tests.

Murl.IEnums.StencilBufferAction GetBackStencilBufferActionForPassedDepthTest()

Returns
Murl.IEnums.StencilBufferAction The stencil buffer action.

SetBlendMode(mode)

Set the material's blend mode.

Boolean SetBlendMode(Murl.IEnums.BlendMode mode)

Parameters
modeThe blend mode.
Returns
Boolean true if successful.

GetBlendMode()

Get the material's blend mode.

Murl.IEnums.BlendMode GetBlendMode()

Returns
Murl.IEnums.BlendMode The blend mode.

SetBlendFunction(srcColorFunction, srcAlphaFunction, dstColorFunction, dstAlphaFunction)

Set the material's blending functions. If alpha blending is enabled (SetBlendMode() with a parameter of IEnums::BLEND_MODE_ALPHA), this method sets the combiner factors used for calculating the actual output pixel RGBA values depending on the source and destination pixel's color and alpha values. The values resulting from evaluating these functions are then combined using the blending equations set via SetBlendEquation().

Boolean SetBlendFunction(Murl.IEnums.BlendFunction srcColorFunction, Murl.IEnums.BlendFunction srcAlphaFunction, Murl.IEnums.BlendFunction dstColorFunction, Murl.IEnums.BlendFunction dstAlphaFunction)

Parameters
srcColorFunctionThe combiner function for the source pixel's RGB values.
srcAlphaFunctionThe combiner function for the source pixel's alpha value.
dstColorFunctionThe combiner function for the destination pixel's RGB values.
dstAlphaFunctionThe combiner function for the destination pixel's alpha value.
Returns
Boolean true if successful.

GetSrcColorBlendFunction()

Get the material's blending function used for the source pixels' RGB values.

Murl.IEnums.BlendFunction GetSrcColorBlendFunction()

Returns
Murl.IEnums.BlendFunction The blending function.

GetSrcAlphaBlendFunction()

Get the material's blending function used for the source pixels' alpha value.

Murl.IEnums.BlendFunction GetSrcAlphaBlendFunction()

Returns
Murl.IEnums.BlendFunction The blending function.

GetDstColorBlendFunction()

Get the material's blending function used for the destination pixels' RGB values.

Murl.IEnums.BlendFunction GetDstColorBlendFunction()

Returns
Murl.IEnums.BlendFunction The blending function.

GetDstAlphaBlendFunction()

Get the material's blending function used for the destination pixels' alpha value.

Murl.IEnums.BlendFunction GetDstAlphaBlendFunction()

Returns
Murl.IEnums.BlendFunction The blending function.

SetBlendEquation(colorEquation, alphaEquation)

Set the material's blending equations. If alpha blending is enabled (SetBlendMode() with a parameter of IEnums::BLEND_MODE_ALPHA), this method sets the actual equations used to combine the outcome of transforming the source and destination pixels according to the functions specified via SetBlendFunction().

Boolean SetBlendEquation(Murl.IEnums.BlendEquation colorEquation, Murl.IEnums.BlendEquation alphaEquation)

Parameters
colorEquationThe blending equation used to combine source and destination RGB values.
alphaEquationThe blending equation used to combine source and destination alpha values.
Returns
Boolean true if successful.

GetColorBlendEquation()

Get the material's blending equation for RGB values.

Murl.IEnums.BlendEquation GetColorBlendEquation()

Returns
Murl.IEnums.BlendEquation The blending equation.

GetAlphaBlendEquation()

Get the material's blending equation for alpha values.

Murl.IEnums.BlendEquation GetAlphaBlendEquation()

Returns
Murl.IEnums.BlendEquation The blending equation.

SetColorBufferClearingEnabled(enabled)

Enable/disable clearing of the render target's color buffer. If color buffer clearing is enabled for a material, the output color buffer gets cleared every time the material is activated (off by default). See SetColorBufferClearValue() for setting the color used for clearing. See also SetDepthBufferClearingEnabled() and SetStencilBufferClearingEnabled().

Boolean SetColorBufferClearingEnabled(Boolean enabled)

Parameters
enabledSet to true to enable color buffer clearing.
Returns
Boolean true if successful.

IsColorBufferClearingEnabled()

Check if clearing of the render target's color buffer is enabled.

Boolean IsColorBufferClearingEnabled()

Returns
Boolean true if color buffer clearing is enabled.

SetDepthBufferClearingEnabled(enabled)

Enable/disable clearing of the render target's depth buffer. If depth buffer clearing is enabled for a material, the output depth buffer gets cleared every time the material is activated (off by default). See SetDepthBufferClearValue() for setting the depth value used for clearing. See also SetStencilBufferClearingEnabled().

Boolean SetDepthBufferClearingEnabled(Boolean enabled)

Parameters
enabledSet to true to enable depth buffer clearing.
Returns
Boolean true if successful.

IsDepthBufferClearingEnabled()

Check if clearing of the render target's depth buffer is enabled.

Boolean IsDepthBufferClearingEnabled()

Returns
Boolean true if depth buffer clearing is enabled.

SetStencilBufferClearingEnabled(enabled)

Enable/disable clearing of the render target's stencil buffer. If stencil buffer clearing is enabled for a material, the output stencil buffer gets cleared every time the material is activated (off by default). See SetStencilBufferClearValue() for setting the stencil value used for clearing. See SetDepthBufferClearingEnabled() and SetColorBufferClearingEnabled().

Boolean SetStencilBufferClearingEnabled(Boolean enabled)

Parameters
enabledSet to true to enable stencil buffer clearing.
Returns
Boolean true if successful.

IsStencilBufferClearingEnabled()

Check if clearing of the render target's stencil buffer is enabled.

Boolean IsStencilBufferClearingEnabled()

Returns
Boolean true if stencil buffer clearing is enabled.

SetColorBufferClearValue(value)

Set the clear color in effect when color buffer clearing is enabled.

Boolean SetColorBufferClearValue(Murl.Color value)

Parameters
valueThe clear color.
Returns
Boolean true if successful.

GetColorBufferClearValue()

Get the clear color in effect when color buffer clearing is enabled.

Murl.Color GetColorBufferClearValue()

Returns
Murl.Color The clear color.

SetDepthBufferClearValue(value)

Set the clear value in effect when depth buffer clearing is enabled.

Boolean SetDepthBufferClearValue(Number value)

Parameters
valueThe clear value.
Returns
Boolean true if successful.

GetDepthBufferClearValue()

Get the clear value in effect when depth buffer clearing is enabled.

Number GetDepthBufferClearValue()

Returns
Number The clear value.

SetStencilBufferClearValue(value)

Set the clear value in effect when stencil buffer clearing is enabled.

Boolean SetStencilBufferClearValue(Integer value)

Parameters
valueThe clear value.
Returns
Boolean true if successful.

GetStencilBufferClearValue()

Get the clear value in effect when stencil buffer clearing is enabled.

Integer GetStencilBufferClearValue()

Returns
Integer The clear value.

SetObjectSortMode(mode)

Set the material's object sorting mode. If not specified, the object sort mode is set to IEnums::OBJECT_SORT_MODE_BY_MATERIAL when the material writes to the depth buffer, and to IEnums::OBJECT_SORT_MODE_BY_DEPTH if depth writes are disabled. During rendering a layer, first all drawables are processed that do update the depth buffer (usually opaque geometry) without and depth sorting, and afterwards all other drawables are rendered back-to-front. The actual depth measure (either Z-distance or squared distance) for the latter case is defined per-camera via Graph::ICamera::SetDepthSortMode().

Boolean SetObjectSortMode(Murl.IEnums.ObjectSortMode mode)

Parameters
modeThe object sorting mode.
Returns
Boolean true if successful.

GetObjectSortMode()

Get the material's object sorting mode.

Murl.IEnums.ObjectSortMode GetObjectSortMode()

Returns
Murl.IEnums.ObjectSortMode The object sorting mode.

SetSortOrder(order)

Set the material's sorting order relative to other materials. This is useful when doing multi-pass rendering using e.g. a Graph::MultiMaterial. Materials with higher values are rendered later.

Boolean SetSortOrder(Integer order)

Parameters
orderThe sorting order.
Returns
Boolean true if successful.

GetSortOrder()

Get the material's sorting order relative to other materials.

Integer GetSortOrder()

Returns
Integer The sorting order.

SetVariableDepthOffset(offset)

Set the variable offset for depth buffer value calculation. This value specifies a variable offset for the generated depth values, before they are written to the depth buffer. See the description of the "factor" parameter at http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPolygonOffset.xml for OpenGL|ES, or the "D3DRS_SLOPESCALEDEPTHBIAS" parameter at http://msdn.microsoft.com/en-us/library/windows/desktop/bb205599(v=vs.85).aspx for DirectX 9. The default offset value is 0.

Boolean SetVariableDepthOffset(Number offset)

Parameters
offsetThe variable depth offset.
Returns
Boolean true if successful.

GetVariableDepthOffset()

Get the variable offset for depth buffer value calculation.

Number GetVariableDepthOffset()

Returns
Number The variable depth offset.

SetConstantDepthOffset(offset)

Set the constant offset for depth buffer value calculation. This value specifies a constant offset for the generated depth values, before they are written to the depth buffer. See the description of the "units" parameter at http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPolygonOffset.xml for OpenGL|ES, or the "D3DRS_DEPTHBIAS" parameter at http://msdn.microsoft.com/en-us/library/windows/desktop/bb205599(v=vs.85).aspx for DirectX 9. The default offset value is 0.

Boolean SetConstantDepthOffset(Number offset)

Parameters
offsetThe constant depth offset.
Returns
Boolean true if successful.

GetConstantDepthOffset()

Get the constant offset for depth buffer value calculation.

Number GetConstantDepthOffset()

Returns
Number The constant depth offset.

SetCameraSlot(cameraSlot)

Set the material's camera slot.

Boolean SetCameraSlot(Integer cameraSlot)

Parameters
cameraSlotThe camera slot.
Returns
Boolean true if successful.

SetLayerOffset(layerOffset)

Set the material's layer offset.

Boolean SetLayerOffset(Integer layerOffset)

Parameters
layerOffsetThe layer offset.
Returns
Boolean true if successful.

SetParametersStage(parametersStage)

Set the material's parameters pass.

Boolean SetParametersStage(Integer parametersStage)

Parameters
parametersStageThe parameters pass.
Returns
Boolean true if successful.

SetTextureStage(unit, textureStage)

Set the material's texture pass for a given unit.

Boolean SetTextureStage(Integer unit, Integer textureStage)

Parameters
unitThe texture unit
textureStageThe texture pass.
Returns
Boolean true if successful.

SetLightStageUnit(unit)

Set the light stage unit used for multi-pass lighting.

Boolean SetLightStageUnit(Integer unit)

Parameters
unitThe light stage unit, or -1 to disable multi-pass lighting.
Returns
Boolean true if successful.

SetLightMaskEnabled(enabled)

Set if the light should be masked for multi-pass lighting. When multi-pass lighting is performed, this property defines whether rendering should only happen within the light's bounding volume projected on screen. This value only has effect when the light pass unit is set to a defined value (other than -1), otherwise the light is never masked. Setting this value to true can considerably speed up multi-light rendering, as only necessary screen areas are updated.

Boolean SetLightMaskEnabled(Boolean enabled)

Parameters
enabledSet to true if the light should be masked.
Returns
Boolean true if successful.

SetMinNumberOfLightStages(minNumStages)

Set the material's minimum number of light stages.

Boolean SetMinNumberOfLightStages(Integer minNumStages)

Parameters
minNumStagesThe minimum number of light stages.
Returns
Boolean true if successful.

SetMaxNumberOfLightStages(maxNumStages)

Set the material's maximum number of light stages.

Boolean SetMaxNumberOfLightStages(Integer maxNumStages)

Parameters
maxNumStagesThe maximum number of light stages.
Returns
Boolean true if successful.

GetNumberOfDetailLevels()

Get the material's number of detail levels.

Integer GetNumberOfDetailLevels()

Returns
Integer The number of detail levels.

GetNumberOfStages(detailLevel)

Get the material's number of stages for a given detail level.

Integer GetNumberOfStages(Integer detailLevel)

Parameters
detailLevelThe detail level to query.
Returns
Integer The number of stages.

GetCameraSlot(detailLevel, stage)

Get the material's camera slot for a given stage.

Integer GetCameraSlot(Integer detailLevel, Integer stage)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
Integer The camera slot.

GetLayerOffset(detailLevel, stage)

Get the material's layer offset for a given stage.

Integer GetLayerOffset(Integer detailLevel, Integer stage)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
Integer The layer offset.

GetParametersStage(detailLevel, stage)

Get the material's parameter stage for a given material stage.

Integer GetParametersStage(Integer detailLevel, Integer stage)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
Integer The parameter stage.

GetTextureStage(detailLevel, stage, unit)

Get the material's texture stage for a given material stage and texture unit.

Integer GetTextureStage(Integer detailLevel, Integer stage, Integer unit)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
unitThe texture unit
Returns
Integer The parameter stage.

GetLightStageUnit(detailLevel, stage)

Get the light stage unit used for multi-stage lighting for a given material stage.

Integer GetLightStageUnit(Integer detailLevel, Integer stage)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
Integer The light stage unit, or -1 if multi-pass lighting is disabled.

IsLightMaskEnabled(detailLevel, stage)

Check if the light is masked for multi-pass lighting.

Boolean IsLightMaskEnabled(Integer detailLevel, Integer stage)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
Boolean true if the light is masked.

GetMinNumberOfLightStages(detailLevel, stage)

Get the material's minimum number of light stages for a given material stage.

Integer GetMinNumberOfLightStages(Integer detailLevel, Integer stage)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
Integer The minimum number of light stages.

GetMaxNumberOfLightStages(detailLevel, stage)

Get the material's maximum number of light stages for a given material stage.

Integer GetMaxNumberOfLightStages(Integer detailLevel, Integer stage)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
Returns
Integer The maximum number of light stages.

GetNumberOfLightStages(detailLevel, stage, numLights)

Get the material's minimum number of light stages for a given material stage.

Integer GetNumberOfLightStages(Integer detailLevel, Integer stage, Integer numLights)

Parameters
detailLevelThe detail level to query.
stageThe stage to query.
numLightsThe actual number of currently active lights.
Returns
Integer The layer offset.