Exemplo n.º 1
0
        protected void DrawLayer(Matrix offset, ShaderResourceView texture,
                                 ShaderResourceView overlay,
                                 int xaxis = 0, int yaxis = 1, int zvalue = 1)
        {
            var dev            = ImageFramework.DirectX.Device.Get();
            var finalTransform = offset * GetTransform();

            // draw the checkers background
            models.ViewData.Checkers.Run(finalTransform);

            // blend over the final image
            dev.OutputMerger.BlendState = models.ViewData.AlphaBlendState;
            shader.Run(finalTransform, texture, overlay, xaxis, yaxis, zvalue);

            dev.OutputMerger.BlendState = models.ViewData.DefaultBlendState;
        }
Exemplo n.º 2
0
        protected void DrawLayer(Matrix offset, int layer, ShaderResourceView texture,
                                 int xaxis = 0, int yaxis = 1, int zvalue = 1)
        {
            var dev            = ImageFramework.DirectX.Device.Get();
            var finalTransform = offset * GetTransform();

            // draw the checkers background
            data.Checkers.Run(data.Buffer, finalTransform, models.Settings.AlphaBackground);

            // blend over the final image
            dev.OutputMerger.BlendState = data.AlphaBlendState;

            shader.Run(data.Buffer, finalTransform, data.GetCrop(models, layer),
                       models.Display.Multiplier, models.Display.DisplayNegative,
                       texture, data.GetSampler(models.Display.LinearInterpolation),
                       xaxis, yaxis, zvalue);

            dev.OutputMerger.BlendState = data.DefaultBlendState;
        }