private void CreateInternalMaterial()
{
// Select DrawTechnique to use
ContentRef<DrawTechnique> technique;
if (this.renderMode == RenderMode.MonochromeBitmap)
technique = DrawTechnique.Mask;
else if (this.renderMode == RenderMode.GrayscaleBitmap)
technique = DrawTechnique.Alpha;
else if (this.renderMode == RenderMode.SmoothBitmap)
technique = DrawTechnique.Alpha;
else
technique = DrawTechnique.SharpAlpha;
// Create and configure internal BatchInfo
BatchInfo matInfo = new BatchInfo(technique, ColorRgba.White, this.texture);
if (technique == DrawTechnique.SharpAlpha)
{
matInfo.SetUniform("smoothness", this.size * 3.0f);
}
this.mat = new Material(matInfo);
}