logo资料库

Unity 玻璃 Shader.docx

第1页 / 共2页
第2页 / 共2页
资料共2页,全文预览结束
超漂亮的玻璃效果 Shader Shader "浅墨 Shader 编程/Volume5/23.玻璃效果 v3" { //-------------------------------【属性】 ----------------------------------------- Properties { _Color ("Main Color", Color) = (1,1,1,1) _MainTex ("Base (RGB) Transparency (A)", 2D) = "white" {} _Reflections ("Base (RGB) Gloss (A)", Cube) = "skybox" { TexGen CubeReflect } } //--------------------------------【子着色器】 ---------------------------------- SubShader { //-----------子着色器标签---------- Tags { "Queue" = "Transparent" } //----------------通道 1-------------- Pass { Blend SrcAlpha OneMinusSrcAlpha Material { Diffuse [_Color] } Lighting On SetTexture [_MainTex] { combine texture * primary double, texture * primary } } //----------------通道 2-------------- Pass { //进行纹理混合 Blend One One //设置材质 Material
{ Diffuse [_Color] } //开光照 Lighting On //和纹理相乘 SetTexture [_Reflections] { combine texture Matrix [_Reflection] } } } }
分享到:
收藏