SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Add Depth32F and Depth32F_Stencil8 Pixel Formats

Open sridenour opened this issue 3 years ago • 0 comments

Right now, the only pixel format available for depth buffers in SDL_GPU is Depth24_Stencil8.

The issue: Metal doesn't support this format on iOS (see screenshot of MTLPixelFormat.h below), it's macOS-only. On iOS there's only Depth32F and Depth32F_Stencil8 (and Depth16, if you like z-fighting ;) )

Metal does support Depth32F and Depth32F_Stencil8 on both iOS and macOS. They're also available in DX12 and Vulkan.

Depth32F also gives more precision for large scenes.

Please add Depth32F and Depth32F_Stencil8 pixel formats to SDL_GPU. (I'm not arguing for Depth24_Stencil8 to be removed)

MTLPixelFormat.h screenshot

sridenour avatar Jan 05 '23 22:01 sridenour