码迷,mamicode.com
首页 > 编程语言 > 详细

Unity3D 玻璃 Shader

时间:2017-05-19 19:36:02      阅读:307      评论:0      收藏:0      [点我收藏+]

标签:data   combine   tag   min   ttext   ext   ade   ini   ssi   

??

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

标签:data   combine   tag   min   ttext   ext   ade   ini   ssi   

原文地址:http://www.cnblogs.com/clnchanpin/p/6879835.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!