马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?注册帐号
x
目录层级
>Graphics
>Graphics OverView
>Materials And Shaders
>Self-Illuminated
Self-Illuminated Vertex-Lit 自发光顶点光照着色器
Self-Illuminated Properties 自发光特性描述
Thisshader allows you to define bright and dark parts of the object. The alphachannel of a secondary texture will define areas of the object that “emit”light by themselves, even when no light is shining on it. In the alpha channel,black is zero light, and white is full light emitted by the object. Any scenelights will add illumination on top of the shader’s illumination. So even ifyour object does not emit any light by itself, it will still be lit by lightsin your scene.
该shader可自定义游戏物体的明暗部分。即使没有其他光源参与交互,也使用副/第二张纹理图的透明通道来迫使游戏物体自身发光。当透明通道值为0时,此时为黑色代表不发光,当达到最大值1时,此时为白色,代表物体充分发光,即亮度最大。而且当游戏场景中的任意光源与带有自发光着色器的游戏物体进行交互时,都会影响该物体的亮度。所以,即便物体自身不发光,它仍然会接收环境中的光源产生光影效果。
Vertex-Lit Properties 顶点光照特性描述
Thisshader is Vertex-Lit, whichis one of the simplest shaders. All lights shining on it are rendered in asingle pass and calculated at vertices only.
顶点光照着色器,最简单的着色器之一。皆因其光照模型仅用单通道进行顶点计算和渲染。
Becauseit is vertex-lit, it won’t display any pixel-based rendering effects, such aslight cookies, normal mapping, or shadows. This shader is also much moresensitive to tesselation of the models. If you put a point light very close toa cube using this shader, the light will only be calculated at the corners.Pixel-lit shaders are much more effective at creating a nice round highlight,independent of tesselation. If that’s an effect you want, you may considerusing a pixel-lit shader or increase tesselation of the objects instead.
虽然这个过程的着色没有涉及像素级别的操作(如灯光烘焙,法线映射和光影特效等),但是它对模型的细分(即模型轮廓)有一定程度的影响。譬如您在一个使用了该着色器的Cube附近放置一个点光源【point light】,灯光只会渲染模型的角落(类似高光效果)。区别于顶点光照模型,像素光照着色器不依赖模型细分,对圆球高光处理有更高效率。所以,当您需要对球体进行高光处理,要么使用像素光照模型,要么提高模型细化程度。
Performance
性能描述
一般情况下,上述着色器占用很少的GPU资源。如果想获得更多资讯,请查阅【Shader Peformance】页面。
|