纳金网

标题: 可调节反射程度的镜面效果 [打印本页]

作者: 奔跑的小兔    时间: 2012-4-5 13:12
标题: 可调节反射程度的镜面效果
可调节反射程度的镜面效果

复制内容到剪贴板代码:

Shader "FX/Mirror Blend" {

Properties {

   _MainTex ("Base (RGB) RefStrength (A)", 2D) = "white" {}

   _ReflectionTex ("Reflection", 2D) = "white" { TexGen ObjectLinear }

}
// two texture cards: full thing

Subshader {

   Pass {

      SetTexture [_ReflectionTex] { matrix [_ProjMatrix] combine texture }

      SetTexture [_MainTex] { combine texture lerp (texture) previous }

   }

}
// fallback: just main texture

Subshader {

   Pass {

      SetTexture [_MainTex] { combine texture }

   }

}
}


作者: 浩劫    时间: 2012-4-6 19:37

作者: Eleven    时间: 2012-4-6 20:04
爱生活,爱纳金网,爱web3D。。。。
作者: osaka    时间: 2012-4-6 21:12

作者: Narkii.com    时间: 2013-5-8 17:23
提示: 作者被禁止或删除 内容自动屏蔽
作者: texfill    时间: 2013-5-9 15:27
感謝分享
作者: 筱筱    时间: 2013-5-10 10:01
谢谢分享!!
作者: 张动画    时间: 2013-5-16 17:28
试一下,学习了
作者: 狂风大尉    时间: 2013-5-16 17:32
试试这个代码的效果再分享一下!
作者: 张动画    时间: 2013-5-18 04:43
试过不好用啊?
作者: nts    时间: 2013-10-17 11:10
这个相当强大,收藏了
作者: gxf5168    时间: 2014-6-18 12:49

谢谢分享!!
作者: yinyuanqings    时间: 2014-6-18 16:05
请问如何控制反射程度呢? 这个shader 即没有Color 也没有float 参数,只能通过贴图来控制反射
作者: 宁唯是宁唯    时间: 2014-6-18 16:41

试过不好用啊?




欢迎光临 纳金网 (http://www.narkii.com/club/) Powered by Discuz! X2.5