Converting angle cutoff shader
Posted: Tue Feb 12, 2019 10:15 am
I'm trying to convert a unity shader to an amplify shader but I can't seem to figure it out.
Here's the specific part that i'm trying to convert:
This part specifically is where i'm stuck:
This is what I have at the moment:
Can anyone point me in the right direction?
Here's the specific part that i'm trying to convert:
- Code: Select all
float4 albedo = tex2D(_MainTex, IN.uv_MainTex) * _Color;
float DotAngle = abs(dot (IN.viewDir, IN.tangent_input));
float3 randomVec = (tex2D(_NoiseTex, IN.uv_MainTex * _noiseScale));
float randomVal = randomVec.x;
clip((1 - (_Angle / DotAngle)) + (randomVal));
clip(albedo.a - _Cutoff);
This part specifically is where i'm stuck:
- Code: Select all
float3 randomVec = (tex2D(_NoiseTex, IN.uv_MainTex * _noiseScale));
This is what I have at the moment:
Can anyone point me in the right direction?