Posts

Post not yet marked as solved
0 Replies
162 Views
I run the immersive app rendered by Metal (here is code), and found that the background of the window and keyboard black is black, as picture shown. I have several questions about it. Can you explain why it is happening in terms of rendering mechanism? Can the background be configured in other colors, such as semi-transparent, white? Do you recommend using Window scene in fully immersive application using Compositor Service? thanks.
Posted Last updated
.
Post not yet marked as solved
1 Replies
383 Views
Hi, I try to use CAMetalLayer to render a page on VisionOS, but the transparency of CAMetalLayer seems not displayed correctly. As the picture shown, the square background should be transparent, but it's not. I have set the PipelineDescriptor and RenderPassDescriptor like this: let pipelineDescriptor = MTLRenderPipelineDescriptor() pipelineDescriptor.colorAttachments[0].pixelFormat = .bgra8Unorm pipelineDescriptor.colorAttachments[0].isBlendingEnabled = true pipelineDescriptor.colorAttachments[0].rgbBlendOperation = .add pipelineDescriptor.colorAttachments[0].alphaBlendOperation = .add pipelineDescriptor.colorAttachments[0].sourceRGBBlendFactor = .sourceAlpha pipelineDescriptor.colorAttachments[0].sourceAlphaBlendFactor = .sourceAlpha pipelineDescriptor.colorAttachments[0].destinationRGBBlendFactor = .oneMinusSourceAlpha pipelineDescriptor.colorAttachments[0].destinationAlphaBlendFactor = .oneMinusSourceAlpha let descriptor = MTLRenderPassDescriptor() descriptor.colorAttachments[0].texture = texture descriptor.colorAttachments[0].loadAction = .clear descriptor.colorAttachments[0].clearColor = MTLClearColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0) descriptor.colorAttachments[0].storeAction = .store
Posted Last updated
.
Post not yet marked as solved
0 Replies
361 Views
Our application is used a CAEAGLLayer to render, but some "metal.gl" traces seems to be displayed with instruments, as the link shown. Therefore, what's the mean of "metal.gl"?https://user-images.githubusercontent.com/4476512/72208740-65e4c980-34e1-11ea-8e9f-3d87129ed154.pngBesides, there are many "blocked waiting for next drawable" events, and these events seems should be displayed when used a CAMetalLayer, but why displayed when used a CAEAGLLayer?Thanks!
Posted Last updated
.