DrawableQueue with unsupported pixel format

I'm trying to make a DrawableQueue with a Descriptor that takes a pixel format of .depth32Float. However, this is returning with a fatal error: Could not create Depth Drawable Queue: unsupportedFormat.

Is there any alternative to .depth32Float for the TextureResource.DrawableQueue.Descriptor?

Thanks!

Hello,

If you catch the error and log its localized description, you will see that DrawableQueue "Only supports rgba8Unorm, rgba8Unorm_srgb, rgba16Float, bgra8Unorm, bgra8Unorm_srgb".

do {
   let drawableQueue = try TextureResource.DrawableQueue(desc)
} catch {
   print(error.localizedDescription)
}

Thanks! However that is unfortunate news because I need to mimic creating the MTLTextureDescriptor like this

   let depthTextureDescriptor = MTLTextureDescriptor(
   depthTextureDescriptor.width = Int(drawableSize.width)
   depthTextureDescriptor.height = Int(drawableSize.height)
   depthTextureDescriptor.pixelFormat = .depth32Float
   depthTextureDescriptor.usage = [.renderTarget, .shaderWrite]

and then create a depthTestTexture

let depthTestTexture = renderer.device.makeTexture(descriptor: depthTextureDescriptor)

then set it to the renderPassDescriptor:

renderPassDescriptor.depthAttachment.texture = depthTestTexture.

I've tried converting that to RealityKit, however, I get stuck on there not being any depth pixel formats.

On another note: Do you happen to know if SceneKit and SCNShadable/SCNProgram allow one to set the depth pixel format?

Hello @AGravityJDev,

Maybe you could describe what sort of functionality you are trying to build, and then I might be able to suggest a course of action.

DrawableQueue with unsupported pixel format
 
 
Q