We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
请问深度缓存为什么不是 z/w 呢? 是我理解有误,还是有什么讲究呢?
The text was updated successfully, but these errors were encountered:
我也想问
Sorry, something went wrong.
按照我的理解,z/w和1/w是线性关系,在做深度测试的时候是等效的。
Depth buffer 的实现有 z-buffer,还有 w-buffer:
https://learn.microsoft.com/en-us/windows-hardware/drivers/display/w-buffering
各有各的实现吧,不少软件实现用这个,用 1/w 的好处有几个:
1)同 z/w 是等效的。 2)最远处是 0,比较好清零。 3)屏幕空间插值时,1/w 最先被计算出来,不必算其他的就能直接判断。 4)不用特殊处理 z。
我觉得用起来更清爽。
No branches or pull requests
请问深度缓存为什么不是 z/w 呢?
是我理解有误,还是有什么讲究呢?
The text was updated successfully, but these errors were encountered: