Question by
AustinDrozin · Mar 03, 2019 at 07:40 PM ·
shadershadersshader writingshader-replacementtrails
Help with porting trail shader to Amplify Shader Editor?
Hello,
I have a shader that works as snow trails currently. It looks like this: https://i.imgur.com/WY8vQgW.png I started to make this shader in Amplify so I can easily add some more features to it. It looks like this currently: https://i.imgur.com/hI4IfNO.png Here is the original code:
Shader "Custom/SnowTrail_1"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_BumpMap ("Bumpmap", 2D) = "bump" {}
}
Category
{
Offset -2, -2
ZWrite Off
//ZTest Always
SubShader
{
Tags { "RenderType"="Opaque" "Queue" = "Geometry-1" }
LOD 200
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
sampler2D _BumpMap;
fixed4 _Color;
struct Input
{
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o)
{
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
o.Alpha = c.a;
}
ENDCG
}
}
Fallback "Diffuse"
}
I added the Offset and ZWrite options to the Amplify shader but it doesn't look the same. Is there anything I need to do in Amplify that I don't know about? I just need the trail to be renderer undearneath the board like in the first photo.
Thanks!
Comment