Class CarbonMaterialParameters

The CarbonMaterialParameters class is used to define the parameters of a CarbonMaterialGraph. These parameters include blend and pipeline states such as depth control. The CarbonMaterialParameters can be edited using the CarbonMaterialGraphKeyWindow.

Constructors

Properties

cullingMode: EnumValueTyped<CullingMode, number>

Determines the culling mode.

depthBias: number

A constant depth bias that will offset the depth values of new pixels by the specified amount.

This is useful to avoid z fighting for objects at the same or similar depth.

depthComparisonFunction: EnumValueTyped<CompareFunction, number>

Determines the comparision operation the renderer uses when comparing previous and current depth values. If the operation passes, the pixel with the current depth value will be considered visible.

The domain of the material.

isDepthReadEnabled: boolean

If enabled, any pixel about to be written will be tested against the value currently in th depth buffer at the same location. If the depth test passes (depending on the set value and the current depthComparisonFunction function), that pixel is written and, if depth write is enabled, the depth buffer is updated.

isDepthWriteEnabled: boolean

If enabled, pixels that passed the depth comparision test will update the depth buffer value.

The render mode of the material. The render mode determines how the material is rendered.

The shading model of the material.

slopeScaledDepthBias: number

A dynamic depth bias that increases as the slope of the rendered polygon increases. This offset will be added on top of the constant depth bias, to offset the depth values of new pixels by the specified amount.

This is useful to avoid z fighting for objects at the same or similar depth.