如何彻底摆脱阴影粉刺和错误的自我阴影? [英] How to get completely rid of shadow acne and erroneous self shadowing?

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

问题描述

我正在做简单的阴影贴图并且在处理阴影痤疮和错误的自我阴影方面存在问题,并且无法摆脱它.我已经尝试向深度值添加偏差并将背面渲染到深度缓冲区,但它并没有删除所有工件.我也无法选择正确的偏见,这会导致彼得潘宁.

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天全站免登陆