TODO: Idk what this does

This commit is contained in:
Eryn Wells 2018-10-11 10:58:01 -07:00
parent 48d3f380fc
commit 81e90f3349

View file

@ -46,7 +46,8 @@ public class Renderer: NSObject, MTKViewDelegate {
pipelineStateDescriptor.fragmentFunction = fragmentShader pipelineStateDescriptor.fragmentFunction = fragmentShader
if let renderAttachment = pipelineStateDescriptor.colorAttachments[0] { if let renderAttachment = pipelineStateDescriptor.colorAttachments[0] {
renderAttachment.pixelFormat = view.colorPixelFormat renderAttachment.pixelFormat = view.colorPixelFormat
// Pulled all this from SO. I don't know what all this does... // Pulled all this from SO. I don't know what it means, but it makes the alpha channel work.
// TODO: Learn what this means???
// https://stackoverflow.com/q/43727335/1174185 // https://stackoverflow.com/q/43727335/1174185
renderAttachment.isBlendingEnabled = true renderAttachment.isBlendingEnabled = true
renderAttachment.alphaBlendOperation = .add renderAttachment.alphaBlendOperation = .add