如何彻底摆脱暗疮和错误的自我遮盖? [英] How to get completely rid of shadow acne and erroneous self shadowing?

查看:103
本文介绍了如何彻底摆脱暗疮和错误的自我遮盖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做简单阴影映射,在处理阴影粉刺和错误的自阴影方面遇到了问题,无法解决。
我已经尝试过向深度值添加偏差并向深度缓冲区渲染背面,但是并不能消除所有伪像。
我也很难选择导致彼得·潘宁(Peter Panning)的正确偏见。

I'm doing Simple Shadow Mapping and have problems with handling shadow acne and erroneous self shadowing and just can't get rid of it. I already tried adding a bias to the depth value and rendering back faces to the depth buffer, but it doesn't remove all artifacts. I also have problems choosing the right bias which leads to Peter Panning.

这里有一些屏幕截图。

所以我的问题是:


  1. 是否有一种健壮(简便)的方法可以完全消除暗疮和错误的自阴影?

  1. Is there a robust (and easy) way to completely eliminate shadow acne and erroneous self shadowing?

如何选择理想偏差?


推荐答案

有一种称为方差阴影贴图的技术,该技术受其自身特有的影响,但非常擅长消除暗疮和错误的自我遮盖。

There's a technique called variance shadow maps which is subject to its own peculiar artifacts, but which is very good at eliminating shadow acne and erroneous self-shadowing. It was designed as a nonlinear filter for shadow maps, to avoid jaggies due to low resolution.

简而言之,它估计深度图的方差,并使用它来查找阴影图。对阴影与深度的平滑保守估计。您需要注意缓冲区的精度,因为大多数实现似乎都是通过滥用动态范围的方式来评估方差。

Briefly, it estimates the variance of the depth map, and uses that to find a smooth, conservative estimate of shadowing vs. depth. You need to be careful about buffer precision, as most implementations seem to evaluate the variance in ways that abuse their dynamic range.

这篇关于如何彻底摆脱暗疮和错误的自我遮盖?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆