public Sprite(float width, float height)
: base(spriteShader)
{
this.hasVertexColors = false;
this.width = width;
this.height = height;
this.v = new float[] {
0, 0,
width, 0,
0, height,
width, 0,
width, height,
0, height
};
this.uv = new float[] {
0, 1,
1, 1,
0, 0,
1, 1,
1, 0,
0, 0
};
this.Update();
this.shaderSetupHook = (mesh) =>
{
mesh.shader.SetUniform("tex", 0);
mesh.shader.SetUniform("use_texture", 1f);
mesh.shader.SetUniform("mul_tint", multiplyTint);
mesh.shader.SetUniform("add_tint", additiveTint);
};
}