Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depth example doesn't show anything on macOS #88

Open
jkelleyrtp opened this issue Mar 17, 2022 · 1 comment
Open

Depth example doesn't show anything on macOS #88

jkelleyrtp opened this issue Mar 17, 2022 · 1 comment

Comments

@jkelleyrtp
Copy link

Git cloning + cargo run --example depth produces a window with nothing in it:

Screen Shot 2022-03-16 at 9 33 54 PM

I'm running macOS so I assume wgpu is going through metal.

@juliusl
Copy link

juliusl commented Jul 22, 2022

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants