     {
         let x = Float(p.x)
         let y = Float(p.y)
-        let w = Float(textures[0].width)
-        let h = Float(textures[0].height)
+        let w = Float(textures[0].width / IMAGE_SSAA)
+        let h = Float(textures[0].height / IMAGE_SSAA)
         let vertexData: [Float] = [
             x-w/2, y+h/2, //a
             x-w/2, y-h/2, //b

    var commandQueue: MTLCommandQueue!
    var pipelineState: MTLRenderPipelineState!
    
    var uniformsBuffer: MTLBuffer!
    var textureCoordBuffer: MTLBuffer!
    var textures: [MTLTexture]!

    {
        let metalLayer = CAMetalLayer()
        metalLayer.device = device
        metalLayer.pixelFormat = .bgra8Unorm
        metalLayer.framebufferOnly = true
        metalLayer.contentsScale = 2
        return metalLayer
    }
    
