BlitMaterial
Built-in DrawableTexture2D copying and blending.
A texture_blit material defaulting to Mix. Selects a copy operation rather than modifying another shader code. Use a texture_blit ShaderMaterial for custom calculations and checked premultiplied alpha.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
BlitMaterialConstructor
public BlitMaterial();Creates a built-in texture_blit copy material in Mix mode. Pass it to BlitRect rather than assigning it as a persistent DrawableTexture2D effect.
Properties1
BlendModeProperty
public BlitMaterial.BlendModeEnum BlendMode { get; set; }Selects a built-in copy shader: Mix, Add, Sub, Mul or Disabled. It does not override an arbitrary custom ShaderMaterial. Do not select the declared PremultipliedAlpha in this version: its index exceeds the current BlitMaterial cache. Use a ShaderMaterial with blend_premul_alpha instead.
Methods2
GetBlendModeBlitMaterial.BlendModeEnum
public BlitMaterial.BlendModeEnum GetBlendMode();Selects a built-in copy shader: Mix, Add, Sub, Mul or Disabled. It does not override an arbitrary custom ShaderMaterial. Do not select the declared PremultipliedAlpha in this version: its index exceeds the current BlitMaterial cache. Use a ShaderMaterial with blend_premul_alpha instead.
BlitMaterial.BlendModeEnumStored BlendModeEnum.
SetBlendModevoid
public void SetBlendMode(BlitMaterial.BlendModeEnum blendMode);Selects a built-in copy shader: Mix, Add, Sub, Mul or Disabled. It does not override an arbitrary custom ShaderMaterial. Do not select the declared PremultipliedAlpha in this version: its index exceeds the current BlitMaterial cache. Use a ShaderMaterial with blend_premul_alpha instead.
| Name | Type | Default |
|---|---|---|
blendMode | BlitMaterial.BlendModeEnum | — |
blendModeOne of the five modes covered by the current cache: Mix/Add/Sub/Mul/Disabled.
BlitMaterial.BlendModeEnum
| Value | Description |
|---|---|
Add = 1 | Additive blending mode. |
Disabled = 4 | No blending mode, direct color copy. |
Mix = 0 | Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. |
Mul = 3 | Multiplicative blending mode. |
PremultipliedAlpha = 5 | Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. |
Sub = 2 | Subtractive blending mode. |