Clip() private method

private Clip ( Float1x1 x ) : void
x Float1x1
return void
コード例 #1
0
    /// <inheritdoc/>
    public float4 Execute()
    {
        float2 position = D2D.GetScenePosition().XY;
        uint   x        = (uint)Hlsl.Floor(position.X);
        uint   y        = (uint)Hlsl.Floor(position.Y);

        uint cellX = (uint)(int)Hlsl.Floor(x / cellSize);
        uint cellY = (uint)(int)Hlsl.Floor(y / cellSize);

        if ((cellX % 2 == 0 && cellY % 2 == 0) ||
            (cellX % 2 == 1 && cellY % 2 == 1))
        {
            Hlsl.Clip(-1);
        }

        return(D2D.GetInput(0));
    }