Converting angle cutoff shader

Node-based Shader Editor

Converting angle cutoff shader

Postby Kandob » 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:
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:
Image

Can anyone point me in the right direction?
Kandob
 
Posts: 3
Joined: Tue Feb 12, 2019 10:09 am

Re: Converting angle cutoff shader

Postby Amplify_Borba » Thu Feb 14, 2019 4:51 pm

Hello, thank you for getting in touch and for your support!

Unfortunately, this forum is mostly aimed at tech support, and shader conversion is outside of the scope of our assistance due to our limited resources, apologies for the inconvenience.

I can share a couple of considerations though, if you intend to use random numbers on the shader it would be best to generate them through script and pass them to a shader variable, and it should also be helpful to examine the code generated by the ASE shader in order to verify if you're on the right track.

Image
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests