Unity3D 玻璃 Shader
Posted clnchanpin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unity3D 玻璃 Shader相关的知识,希望对你有一定的参考价值。
Shader "Custom/Glass" {
// Upgrade NOTE: replaced ‘SeperateSpecular‘ with ‘SeparateSpecular‘
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Spec Color", Color) = (1,1,1,0)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_Shininess ("Shininess", Range (0.1, 1)) = 0.7
_MainTex ("Base (RGB) Trans. (Alpha)", 2D) = "white" { }
}
Category {
ZWrite Off
Cull Off
Alphatest Greater 0
Tags {Queue=Transparent}
Blend SrcAlpha OneMinusSrcAlpha
SubShader {
Material {
Diffuse [_Color]
Ambient [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
Pass {
Lighting On
SeparateSpecular On
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * primary DOUBLE, texture * constant
}
}
}
}
}
以上是关于Unity3D 玻璃 Shader的主要内容,如果未能解决你的问题,请参考以下文章