wgpu_glyph
wgpu_glyph copied to clipboard
Depth example doesn't show anything on macOS
Git cloning + cargo run --example depth
produces a window with nothing in it:
![Screen Shot 2022-03-16 at 9 33 54 PM](https://user-images.githubusercontent.com/10237910/158718874-1833bb27-c8a1-4efe-ba24-426a2bb02c01.png)
I'm running macOS so I assume wgpu is going through metal.
On line 55 in the example, try changing the compare function from Greater to LessEqual,
let mut glyph_brush = GlyphBrushBuilder::using_font(inconsolata)
.depth_stencil_state(wgpu::DepthStencilState {
format: wgpu::TextureFormat::Depth32Float,
depth_write_enabled: true,
depth_compare: wgpu::CompareFunction::LessEqual, <---
stencil: wgpu::StencilState::default(),
bias: wgpu::DepthBiasState::default(),
})
.build(&device, FORMAT);