Skip to content

Reverse Z buffer #1497

Answered by cwfitzgerald
voxelias asked this question in Q&A
Jun 15, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

In terms of wgpu, all you need it to use a floating point depth buffer (Depth32Float). Then on the math end, you want your projection matrix to invert Z. A lot of graphics focused math libs can generate these (see for example, glam's Mat4::perspective_infinite_reverse_lh). What are you currently using to generate your projection matrix?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@kvark
Comment options

@voxelias
Comment options

@kvark
Comment options

@voxelias
Comment options

Answer selected by voxelias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants