soundvision/UnityProject/Assets/Shader/Vertex Modifier.shader

28 lines
645 B
Text
Raw Normal View History

2019-07-07 15:56:52 +00:00
 Shader "Vertex Modifier" {
Properties {
_MainTex ("Texture", 2D) = "depth" {}
_Scale ("Scale", Float) = 1.0
2019-07-07 15:56:52 +00:00
}
SubShader {
Tags { "RenderType" = "Opaque" }
2019-07-07 15:56:52 +00:00
CGPROGRAM
#pragma surface surf Lambert vertex:vert
struct Input {
float2 uv_MainTex;
};
float _Scale;
2019-07-07 15:56:52 +00:00
sampler2D _MainTex;
void vert (inout appdata_full v){
v.vertex.z += _Scale * tex2Dlod(_MainTex, v.texcoord).r;
2019-07-07 15:56:52 +00:00
}
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = float4(1.0f, 1.0f, 1.0f, 1.0f);
}
ENDCG
}
}