       xy.x = abs(round(frac(0.5 * xy.x)) - frac(xy.x));
    }
    
    if (samplerModeType.y < Wrap)
    {
        xy.y = frac(xy.y);
    }
    else if (samplerModeType.y < Mirror)
    {
        xy.y = abs(round(frac(0.5 * xy.y)) - frac(xy.y));
    }
    
    psStageData.Color = tex2D(TextureSampler, xy);
}
