         setFilterBuffer()
         
         
-        let sampler = MTLSamplerDescriptor()
-        sampler.label = "nearest"
-        _samplerStates.append(_device.newSamplerStateWithDescriptor(sampler))
-        sampler.label = "bilinear"
-        sampler.minFilter = .Linear
-        sampler.magFilter = .Linear
-        
-        _samplerStates.append(_device.newSamplerStateWithDescriptor(sampler))
+        let nearest = MTLSamplerDescriptor()
+        nearest.label = "nearest"
+        
+        let bilinear = MTLSamplerDescriptor()
+        bilinear.label = "bilinear"
+        bilinear.minFilter = .Linear
+        bilinear.magFilter = .Linear
+        _samplerStates = [nearest, bilinear].map {self._device.newSamplerStateWithDescriptor($0)}
 
 
         

                    renderEncoder.setViewport(view)
                }
                renderEncoder.setRenderPipelineState(pipeline)
                for i in 0..<vertexBuffers.count {
                    renderEncoder.setVertexBuffer(vertexBuffers[i].0, offset: vertexBuffers[i].1, atIndex: i)
                }
                for i in 0..<fragmentBuffers.count {
                    renderEncoder.setFragmentBuffer(fragmentBuffers[i].0, offset: fragmentBuffers[i].1, atIndex: i)
                }
                for i in 0..<sourceTextures.count {
                    renderEncoder.setFragmentTexture(sourceTextures[i], atIndex: i)
                }
                for i in 0..<_samplerStates.count {
                    renderEncoder.setFragmentSamplerState(_samplerStates[i], atIndex: i)
                }
                renderEncoder.drawPrimitives(.Triangle, vertexStart: 0, vertexCount: 6, instanceCount: 1)
                renderEncoder.popDebugGroup()
                renderEncoder.endEncoding()

        if _device.supportsFeatureSet(._iOS_GPUFamily2_v1) {
            println("Using high quality blur...")
            highQuality = true
            _blurPipelineStates = ["BlurX_HQ", "BlurY_HQ"].map {self.cachedPipelineStateFor($0)!}
            let fragmentArgs = (_shaderArguments["BlurX_HQ"]!.fragmentArguments as! [MTLArgument]).filter({$0.name == "blurParameters"})
            if fragmentArgs.count == 1 {
                _blurArgs = MetalBufferArray<BlurBuffer>(arguments: fragmentArgs[0], count: _numberShaderBuffers)
            }
        } else {
            highQuality = false
            _blurPipelineStates = ["BlurX", "BlurY"].map {self.cachedPipelineStateFor($0)!}
            let fragmentArgs = (_shaderArguments["BlurX"]!.fragmentArguments as! [MTLArgument]).filter({$0.name == "blurParameters"})
            if fragmentArgs.count == 1 {
                _blurArgs = MetalBufferArray<BlurBuffer>(arguments: fragmentArgs[0], count: _numberShaderBuffers)
