Remove alpha render attachment stuff
This commit is contained in:
parent
67134c157b
commit
35ed423144
1 changed files with 0 additions and 10 deletions
|
@ -48,16 +48,6 @@ class Renderer: NSObject, MTKViewDelegate {
|
|||
desc.fragmentFunction = fragmentShader
|
||||
if let renderAttachment = desc.colorAttachments[0] {
|
||||
renderAttachment.pixelFormat = pixelFormat
|
||||
// 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
|
||||
renderAttachment.isBlendingEnabled = true
|
||||
renderAttachment.alphaBlendOperation = .add
|
||||
renderAttachment.rgbBlendOperation = .add
|
||||
renderAttachment.sourceRGBBlendFactor = .sourceAlpha
|
||||
renderAttachment.sourceAlphaBlendFactor = .sourceAlpha
|
||||
renderAttachment.destinationRGBBlendFactor = .oneMinusSourceAlpha
|
||||
renderAttachment.destinationAlphaBlendFactor = .oneMinusSourceAlpha
|
||||
}
|
||||
|
||||
do {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue