예제 #1
0
        internal static void DrawColorWithMask(GraphicsDevice graphicsDevice, int x, int y, int w, int h, Texture2D mask, Color color)
        {
            Effect tempEffect = GlobalContent.MaskShader.Clone();

            tempEffect.Parameters["maskColor"].SetValue(color.ToVector4());
            GraphicsBasic.DrawSpriteRect(graphicsDevice, x, y, w, h, mask, tempEffect, Color.White);
        }
예제 #2
0
        internal static void DrawColorWithInvertedMask(GraphicsDevice graphicsDevice, int x, int y, int w, int h, Texture2D mask, Color color, int lowest, int highest)
        {
            Effect tempEffect = GlobalContent.InvertedMaskShader.Clone();

            tempEffect.Parameters["maskColor"].SetValue(color.ToVector4());
            tempEffect.Parameters["lo"].SetValue(lowest / 255f);
            tempEffect.Parameters["hi"].SetValue(highest / 255f);
            GraphicsBasic.DrawSpriteRect(graphicsDevice, x, y, w, h, mask, tempEffect, Color.White);
        }