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(0, 0, 0), rot, scale)); matrices.Add(Matrix4x4.TRS(new Vector3(100, 100, 0), rot, scale)); matrices.Add(Matrix4x4.TRS(new Vector3(200, 200, 0), rot, scale));
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)
|