Skip to content

Wangmmmm/ShadowDetecting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShadowDetecting

Unity检测物体是否在阴影

场景中的胶囊体即为待检测物体

场景只有一个平行光

注意:

1.本Demo把RenderTexture提前创建好了,所以为了适应屏幕把Game窗口分辨率调为1920X1020。

2.提高性能的建议:非逐帧检测,隔一段稍长的时间检测一次。修改RenderTexture的分辨率,可以小一点,或者动态创建,适应屏幕的长宽比。

3.提高准确度的建议:把阴影摄像机远裁剪平面拉近一点,使得归一化时误差减小。

About

Unity检测物体是否在阴影中

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages