AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

ShaderAsset.MatrixArraySet

Method

public void MatrixArraySet(string name, Matrix4x4 [] matrices)
public void MatrixArraySet(int propertyID, Matrix4x4 [] matrices)
public void MatrixArraySet(string name, List< Matrix4x4 > matrices)
public void MatrixArraySet(int propertyID, List< Matrix4x4 > matrices)

Parameters

name string Property name
matrices Matrix4x4 [] Matrix array
propertyID int Property ID
matrices List< Matrix4x4 > Matrix list

Returns

Nothing.

Description

Set a shader matrix array property.

Example

ShaderAsset  shaderEffect = new ShaderAsset();

void Initialize() {
    shaderEffect.Load("shaders/effects");
}

void Render() {
    var matrices = new List<Matrix4x4>();
    matrices.Add(Matrix4x4.TRS(new Vector3(000), rot, scale));
    matrices.Add(Matrix4x4.TRS(new Vector3(1001000), rot, scale));
    matrices.Add(Matrix4x4.TRS(new Vector3(2002000), rot, scale));

    // Draw a sprite with a shader effect
    RB.ShaderSet(shaderEffect);
    shaderEffect.MatrixArraySet("mats", matrices);
    RB.DrawSprite("hero", pos);
}

See Also

RB.ShaderSet
RB.ShaderApplyNow
RB.ShaderReset
ShaderAsset.ColorSet
ShaderAsset.ColorArraySet
ShaderAsset.FloatSet
ShaderAsset.IntSet
ShaderAsset.MatrixSet
ShaderAsset.VectorSet
ShaderAsset.VectorArraySet
ShaderAsset.SpriteSheetTextureSet
ShaderAsset.SpriteSheetFilterSet

See Docs

Features - Shaders (Advanced Topic)