Post

Replies

Boosts

Views

Activity

How to load MTLTexture without premultiplied alpha?
Hello all, I need my texture to be not premultiplied alpha, because is use the alpha for some additional calculations in the fragment shader. At the moment I load my texture like this let textureLoader = MTKTextureLoader(device: sceneView.device!) myTexture = try textureLoader.newTexture(URL: URL(fileURLWithPath: path!), options: [MTKTextureLoader.Option.SRGB: false]) because I need the raw RGBA values. But of course it gets premultiplied. How can I turn off this behavior?
3
0
1.5k
Jan ’23
Properly take a screenshot of a SwiftUI/ARKit IOS app?
I tried several methods already. The last one did let me actually make a screenshots, but then SwiftUI seems to confuse itself and stops showing me the AR video capture and my other SceneNodes. Just white. Toolbar and other SwiftUI stuff is still showing as intended. So here is my question: What is the proper way to take a screenshot of a running ARKit session in SwiftUI? Keep in mind, I don't need the captured video image, I know how to extract that.
0
0
565
Nov ’21
How to load MTLTexture without premultiplied alpha?
Hello all, I need my texture to be not premultiplied alpha, because is use the alpha for some additional calculations in the fragment shader. At the moment I load my texture like this let textureLoader = MTKTextureLoader(device: sceneView.device!) myTexture = try textureLoader.newTexture(URL: URL(fileURLWithPath: path!), options: [MTKTextureLoader.Option.SRGB: false]) because I need the raw RGBA values. But of course it gets premultiplied. How can I turn off this behavior?
Replies
3
Boosts
0
Views
1.5k
Activity
Jan ’23
Properly take a screenshot of a SwiftUI/ARKit IOS app?
I tried several methods already. The last one did let me actually make a screenshots, but then SwiftUI seems to confuse itself and stops showing me the AR video capture and my other SceneNodes. Just white. Toolbar and other SwiftUI stuff is still showing as intended. So here is my question: What is the proper way to take a screenshot of a running ARKit session in SwiftUI? Keep in mind, I don't need the captured video image, I know how to extract that.
Replies
0
Boosts
0
Views
565
Activity
Nov ’21