gongminmin / KlayGE

KlayGE is a cross-platform open source game engine with plugin-based architecture.
http://www.klayge.org
GNU General Public License v2.0
2.06k stars 352 forks source link

General depth buffer linearization #190

Closed gongminmin closed 5 years ago

gongminmin commented 5 years ago

Current depth buffer linearization is fast but can't process oblique clipping perspective matrix. Need to have a general version of it.

gongminmin commented 5 years ago

Further analyst shows that it's not necessary to modify the depth to linear part. Instead, a non-oblique matrix need to provide when a oblique clipping perspective matrix is in use.

Change the goal to: