Color, Material, Lighting
2014-07-23 09:50
267 查看
【Color, Material, Lighting】
The material and lighting parameters are used to control the built-in vertex lighting. Vertex lighting is the standard Direct3D/OpenGL lighting model that is computed for each vertex.
material & parameters 参数用于控制vertex lighting。
Lighting on turns it on. Lighting is affected by Material block, ColorMaterial and SeparateSpecular commands.
Lighting on 命令开启顶点光照。Lighting受Material、ColorMaterial、SeparateSpecular命令的影响。
Per-pixel lights are usually implemented with custom vertex/fragment programs and don't use vertex lighting. For these you don't use any of the commands described here, instead you define your own vertex and fragment programs where you do all lighting, texturing and anything else yourself.
Per-pixel 光照通过通过vertex/fragment 程序来实现,它们不使用顶点光照。Per-pixel光照不使用上述的任何命令,你需要定义自己的vertex & fragment 程序,在那里你要做lighting、texturing等所有的事。
View Code
参考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/SL-Material.html
The material and lighting parameters are used to control the built-in vertex lighting. Vertex lighting is the standard Direct3D/OpenGL lighting model that is computed for each vertex.
material & parameters 参数用于控制vertex lighting。
Lighting on turns it on. Lighting is affected by Material block, ColorMaterial and SeparateSpecular commands.
Lighting on 命令开启顶点光照。Lighting受Material、ColorMaterial、SeparateSpecular命令的影响。
Per-pixel lights are usually implemented with custom vertex/fragment programs and don't use vertex lighting. For these you don't use any of the commands described here, instead you define your own vertex and fragment programs where you do all lighting, texturing and anything else yourself.
Per-pixel 光照通过通过vertex/fragment 程序来实现,它们不使用顶点光照。Per-pixel光照不使用上述的任何命令,你需要定义自己的vertex & fragment 程序,在那里你要做lighting、texturing等所有的事。
Shader "VertexLit" { Properties { _Color ("Main Color", Color) = (1,1,1,0) _SpecColor ("Spec Color", Color) = (1,1,1,1) _Emission ("Emmisive Color", Color) = (0,0,0,0) _Shininess ("Shininess", Range (0.01, 1)) = 0.7 _MainTex ("Base (RGB)", 2D) = "white" {} } SubShader { Pass { Material { Diffuse [_Color] Ambient [_Color] Shininess [_Shininess] Specular [_SpecColor] Emission [_Emission] } Lighting On SeparateSpecular On SetTexture [_MainTex] { Combine texture * primary DOUBLE, texture * primary } } } }
View Code
参考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/SL-Material.html
相关文章推荐
- Unity3d Shader(三) Pass(Color, Material, Lighting )
- Unity3D Shader官方教程翻译(六)----Shader语法:Pass的Color, Material, Lighting
- Unity3D Shader官方教程翻译(六)----Shader语法:Pass的Color, Material, Lighting
- Unity3D Shader官方教程翻译(六)----Shader语法:Pass的Color, Material, Lighting
- Unity3D Shader官方教程翻译(六)----Shader语法:Pass的Color, Material, Lighting
- Unity3D Shader官方教程翻译(六)----Shader语法:Pass的Color, Material, Lighting
- Unity3d Shader开发(三)Pass(Color, Material, Lighting )
- Unity3D Shader官方教程翻译(六)----Shader语法:Pass的Color, Material, Lighting
- Unity3d Shader开发(三)Pass(Color, Material, Lighting )
- 简述unity中material.color及Color.Lerp线性插值的用法
- glDisable(GL_COLOR_MATERIAL)
- OpenGL使用glColorMaterial设置材质
- 一个类似于环形的 ProgressBar 的,可以自定义 Color,style 等属性的 View,支持 Material 风格.
- 【经验】判断Material的Color是否为空
- Unity3D 语句 objCube.GetComponent<Renderer>().material.color 报错
- Android ColorFilter:PorterDuffColorFilter、LightingColorFilter、ColorMatrixColorFilter
- 自定义控件(3)---LightingColorFilter光照颜色过滤器--Selector的效果
- MaterialDesignColor谷歌官方的MaterialDesign颜色代码
- glColorMaterial
- android中使用material design的问题-Cannot resolve symbol: @color:material_blue_500