冰材质2-iceRefrationSurf
来源:互联网 发布:遗传算法原理 编辑:程序博客网 时间:2024/05/10 20:54
Shader "Custom/iceRefrationSurf" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("BaseTex", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
_BumpAmt ("Distortion", range (0,1)) = 0.12
}
SubShader {
Tags { "Queue"="Transparent" "RenderType"="Opaque" }
ZWrite off
Lighting off
GrabPass {
Name "BASE"
Tags { "LightMode" = "Always" }
}
CGPROGRAM
#pragma surface surf Lambert nolightmap nodirlightmap
#pragma target 3.0
#pragma debug
float4 _Color;
sampler2D _MainTex;
sampler2D _BumpMap;
sampler2D _GrabTexture;
float _BumpAmt;
struct Input {
float2 uv_MainTex;
float2 uv_BumpMap;
float4 screenPos;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed3 nor = UnpackNormal (tex2D(_BumpMap, IN.uv_BumpMap));
fixed4 col = tex2D(_MainTex,IN.uv_MainTex);
float4 screenUV2 = IN.screenPos;
screenUV2.xy = screenUV2.xy / screenUV2.w;
screenUV2.xy += nor.xy * _BumpAmt;
fixed4 trans = tex2D(_GrabTexture,screenUV2.xy)*_Color;
trans*=col;
o.Albedo = trans.rgb;
o.Emission = trans.rgb;
;
}
ENDCG
}
FallBack "Transparent/VertexLit"
}
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("BaseTex", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
_BumpAmt ("Distortion", range (0,1)) = 0.12
}
SubShader {
Tags { "Queue"="Transparent" "RenderType"="Opaque" }
ZWrite off
Lighting off
GrabPass {
Name "BASE"
Tags { "LightMode" = "Always" }
}
CGPROGRAM
#pragma surface surf Lambert nolightmap nodirlightmap
#pragma target 3.0
#pragma debug
float4 _Color;
sampler2D _MainTex;
sampler2D _BumpMap;
sampler2D _GrabTexture;
float _BumpAmt;
struct Input {
float2 uv_MainTex;
float2 uv_BumpMap;
float4 screenPos;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed3 nor = UnpackNormal (tex2D(_BumpMap, IN.uv_BumpMap));
fixed4 col = tex2D(_MainTex,IN.uv_MainTex);
float4 screenUV2 = IN.screenPos;
screenUV2.xy = screenUV2.xy / screenUV2.w;
screenUV2.xy += nor.xy * _BumpAmt;
fixed4 trans = tex2D(_GrabTexture,screenUV2.xy)*_Color;
trans*=col;
o.Albedo = trans.rgb;
o.Emission = trans.rgb;
;
}
ENDCG
}
FallBack "Transparent/VertexLit"
}
0 0
- 冰材质2-iceRefrationSurf
- 冰材质2-iceRefrationVF
- 冰材质1-iceTrans
- 材质
- 材质
- 大话Gamebryo材质系统2:
- OpenGL系统设计-光照与材质(2)
- OGRE 3D 程序设计 材质 2 (转)
- Ogre 3D程序设计 Ogre材质2
- 材质继承 模板材质
- 材质与材质脚本
- OpenGL ES系列 之 提高-2:材质纹理
- OpenGL ES系列之提高-2:材质纹理
- Houdini SHOP学习笔记2 带透明通道的材质
- 虚幻4 材质的编译2 真正的编译过程
- OpenGL学习: 光照系列2-材质和lighting maps使用
- OPENGL材质
- 网材质
- JSP 九大内置对象详解
- GameKit的蓝牙开发代码总结
- PHP 比较两个字符串的相似度
- 阿里巴巴 算法、数据工程师笔试题选解
- 移动互联网手机分享消费将会影响我们的消费习惯,你准备好了吗?
- 冰材质2-iceRefrationSurf
- linux内核编译与配置(X86)
- 【xv6学习之HW1】shell
- win10安装准备设备阶段黑屏
- springmvc 请求响应时报异常
- 《设计模式》之工厂方法
- 海量数据等概率选取问题
- MySQL 如何提高innodb insert into select的插入速度
- Mac OS上设置Django开发环境