某些物体可能具有均匀的颜色和光滑的表面,但光滑程度不足以照射反射光。
这些哑光材料最好用Diffuse Shader。 在现实世界中,不存在纯diffuse materials
Diffuse shader经常出现在游戏中,下面就是一个简单的Diffuse shader代码
Shader "Custom/DiffuseShader" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma surface surf Standard fullforwardshadows

本文介绍了Unity5.x中适用于哑光材料的Diffuse Shader,并探讨了Surface Shader的三种输出结构:SurfaceOutput、SurfaceOutputStandard和SurfaceOutputStandardSpecular。通过理解这些结构,开发者能更好地控制材质的渲染属性,实现不同光照模型的效果。
最低0.47元/天 解锁文章
4337

被折叠的 条评论
为什么被折叠?



