2014-08-29 20:39:22|?次阅读|上传:huigezrx【已有?条评论】发表评论

关键词:游戏, 虚拟现实, Unity3D|来源:唯设编程网

Unity Manual > Advanced > Shadows in Unity > Troubleshooting Shadows


This page lists solutions to common shadow problems.  此页面列出了公共的阴影问题的解决办法。

I see no shadows at all! 我根本看不到阴影

Shadows are a Unity Pro only feature. If you have Unity Indie, you won't get shadows. Simpler shadow methods, like using a Projector, are still possible of course.  阴影是一个Unity专业版本唯一的功能。如果你是Unity的独立版本,你将不会得到阴影。简单的阴影的方法,像使用一个投影机,是可行的做法。

Shadows also require certain graphics hardware support. See Shadows page for details.  阴影还需要一定的图形硬件支持。详情请参阅阴影网页。

Check if shadows are not completely disabled in Quality Settings.  检验,在质量设置里,阴影不能设置为禁用。

Some of my objects do not cast or receive shadows我的一些对象不能消除或接收阴影

First, the Renderer has to have Receive Shadows on to have shadows on itself; and Cast Shadows on to cast shadows on other objects (both are on by default).  首先,渲染器在它自己身上的阴影必须接收阴影,并使人对其它物体阴影投射阴影(两者都默认情况下)。

Next, only opaque objects cast and receive shadows; that means if you use built-in Transparent or Particle shaders then you'll get no shadows. In most cases it's possible to Transparent Cutout shaders (for objects like fences, vegetation etc.). If you use custom written Shaders, they have to be pixel-lit and use Geometry render queue. Objects using VertexLit shaders do not receive shadows either (but can cast shadows just fine).


Finally, only Pixel lights cast shadows. If you want to make sure that some light always casts shadows, no matter how many other lights are in the scene, set it to Force Pixel render mode (see Light documentation).


发表评论0条 】