This version of the Edge Detect image effect creates outlines around edges by taking the scene geometry into account. Edges are not determined by colour differences but by the surface normals and distance from camera of neighbouring pixels (the surface normal is an "arrow" that indicates the direction the surface is facing at a given pixel position). Generally, where two adjacent pixels have significantly different normals and/or distances from the camera, there is an edge in the scene.
该边界提取的图像特效版本是通过场景中物体的几何信息来将其轮廓线抽取出来。边缘不仅由颜色的差异来决定,同时也由相邻像素所对应的法线朝向和离相机的距离来决定。一般来说,当两个相邻像素拥有明显不同的法线朝向或距相机距离时,这就是场景中的一个边缘。
As with the other image effects, this effect is only available in Unity Pro and you must have the Pro Standard Assets installed before it becomes available
和其他图像特效一样,该特效只能在Unity Pro上进行使用,并且在使用之前必须安装Pro Standard Assets。
没有边缘检测的场景
该场景中的边缘显示
This effect uses the ImageEffectOpaque attribute which enables image effects to be executed before the transparent render passes. By default, image effects are executed after both opaque and transparent passes have been fully rendered.
该特效使用了ImageEffectOpaque属性,该属性使图像特效在渲染透明物体通道之前执行。默认情况下,图像特效都是在场景中实体和透明物体全部渲染完成后进行的。
Properties 属性
Mode 模式 | Chose between Thin and Thick. Thick will take more samples into consideration to construct outlines. 在粗细之间进行选择。粗表示使用更多的采样点来生成轮廓线 |
Edge Sensitivity 边缘敏感度 | |
Depth 深度 | The minimum difference between the distances of adjacent pixels that will indicate an edge. 相邻像素的深度最小差异。大于该差异,则认为存在边。 |
Normals 法线 | The minimum difference between the normals of adjacent pixels that will indicate an edge. 相邻像素的最小法线朝向差异。大于该差异,则认为存在边。 |
Background options 背景选项 | |
Edges only 仅边缘 | Blend the background with a fixed color. 将一个固定颜色与背景进行混合 |
Background 背景 | The color used when Edges only is > 0. 当Edges Only数值大于0时所采用的颜色 |
Hardware support 硬件支持
This effect requires a graphics card with pixel shaders (2.0) or OpenGL ES 2.0. Additionally, depth texture support is required. PC: NVIDIA cards since 2004 (GeForce 6), AMD cards since 2004 (Radeon 9500), Intel cards since 2006 (GMA X3000); Mobile: OpenGL ES 2.0 with depth texture support; Consoles: Xbox 360, PS3.
这个特效需要显卡拥有像素着色器(2.0)或者OpenGL ES 2.0。台式机:2004年以后的NVIDIA显卡(GeForce 6),2004年以后的AMD显卡(Radeon 9500),2006年以后的Intel卡(GMA X3000);移动设备:OpenGL ES 2.0并支持深度纹理;控制台: Xbox 360、 PS3。
All image effects automatically disable themselves when they can not run on end-users graphics card.
所有图像特效如果无法在用户显卡上运行时将会自动被关闭。