Creates a new carbon material instance that uses the specified carbonMaterial as parent.
OptionalisInternalConstructor: booleanThe parent material that is being instanced.
The parent material that is being instanced.
Returns a reference handle for this resource.
Determines if the resource is destroyed.
Returns the meta data of this resource.
Sets a material model and applies all model parameters to the material.
Name of the resource. Use primarily for easier identification and not important to the engine itself.
Sets a shader that will be used by the material. Material will be initialized using all compatible techniques from the shader. Shader must be set before doing any other operations with the material.
Sets a shader that will be used by the material. Material will be initialized using all compatible techniques from the shader. Shader must be set before doing any other operations with the material.
Sets a shader that will be used by the material. Material will be initialized using all compatible techniques from the shader. Shader must be set before doing any other operations with the material.
Gets the surface model type of the material. Typically this depends on the shader implementation and controls which buffers are bound during rendering.
Returns the total number of techniques supported by this material.
Set of parameters that determine which subset of techniques in the assigned shader should be used. Only the techniques that have the provided parameters with the provided values will match. This will control which technique is considered the default technique and which subset of techniques are searched during a call to findTechnique().
Compiles the specified variation asynchronously, if the variation is already compiled, the operation will complete immediately.
The variation to compile, if unspecified, compiles the material default variation.
Dispatch a compute shader using this material asynchronously.
The number of thread groups to dispatch in the X dimension.
The number of thread groups to dispatch in the Y dimension.
The number of thread groups to dispatch in the Z dimension.
A handle to the async operation, which is marked as completed once the dispatch was queued on core.
Returns a boolean value assigned with the parameter with the specified name.
Optionally if the parameter is an array you may provide an array index you which to retrieve.
Parameter name.
OptionalarrayIndex: numberPosition index as an array.
Returns a color assigned with the parameter with the specified name. If a color gradient is assigned to this parameter, returns the gradient color evaluated at time 0.
Optionally if the parameter is an array you may provide an array index you which to retrieve.
OptionalarrayIndex: numberReturns a color gradient assigned with the parameter with the specified name. If the parameter has a constant value bound instead of a gradient then this method returns an empty gradient.
Optionally if the parameter is an array you may provide an array index you which to retrieve.
OptionalarrayIndex: numberReturns a float value assigned with the parameter with the specified name. If a curve is assigned to this parameter, returns the curve value evaluated at time 0.
Optionally if the parameter is an array you may provide an array index you which to retrieve.
OptionalarrayIndex: numberReturns a curve value assigned to the parameter with the specified name. If the parameter has a constant value bound instead of a curve then this method returns an empty curve.
Optionally if the parameter is an array you may provide an array index you which to retrieve.
OptionalarrayIndex: numberReturns an integer value assigned with the parameter with the specified name.
Optionally if the parameter is an array you may provide an array index you which to retrieve.
Parameter name.
OptionalarrayIndex: numberPosition index as an array.
Returns a sampler state assigned with the parameter with the specified name.
Returns a SpriteImage assigned to the material parameter.
Name of the texture parameter.
SpriteImage assigned to the specified material or null if not found.
Returns an unsigned integer value assigned with the parameter with the specified name.
Optionally if the parameter is an array you may provide an array index you which to retrieve.
Parameter name.
OptionalarrayIndex: numberPosition index as an array.
Assigns a buffer to the shader parameter with the specified name.
Assigns a color to the shader parameter with the specified name.
Optionally if the parameter is an array you may provide an array index to assign the value to.
OptionalarrayIndex: numberAssigns a color gradient to the shader parameter with the specified name. The system will automatically evaluate the gradient with the passage of time and apply the evaluated value to the parameter.
Optionally if the parameter is an array you may provide an array index to assign the value to.
OptionalarrayIndex: numberOptionalarrayIndex: numberAssigns a sampler state to the shader parameter with the specified name.
Assigns a SpriteImage to the specified material parameter. The sprite image is allowed to be animated, or just used for referencing a subset of a texture atlas.
Name of the texture parameter.
SpriteImage resource to assign.
Assigns a texture to the specified material parameter.
Name of the texture parameter.
Texture resource to assign.
Assigns a texture to the specified material parameter. Allows you to specify a surface parameter that allows you to bind only a sub-set of the texture.
Name of the texture parameter.
Texture resource to assign.
Subset of the texture to assign.
The CarbonMaterialInstance class implements a Material that is backend by a CarbonMaterial that owns the underlying shader. This allows changes to the parent Carbon Material while further customizing its exposed parameters and textures.
If the parent Carbon Material is updated with a new graph, the instance updates automatically. Carbon Material Instances are a powerful feature to reuse a shader but apply customization to minimize the number of shaders that must be compiled. It is advisable to use Carbon Material Instances whenever possible.