Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. Shader "PolygonArsenal/PolyRimLightSolid"
  2. {
  3. Properties
  4. {
  5. _InnerColor ("Inner Color", Color) = (1.0, 1.0, 1.0, 1.0)
  6. _RimColor ("Rim Color", Color) = (0.26,0.19,0.16,0.0)
  7. _RimWidth ("Rim Width", Range(0.2,20.0)) = 3.0
  8. _RimGlow ("Rim Glow Multiplier", Range(0.0,9.0)) = 1.0
  9. }
  10. SubShader
  11. {
  12. Tags { "Queue" = "Transparent" "RenderType"="Transparent" }
  13.  
  14. Cull Back
  15. Lighting Off
  16. Blend SrcAlpha OneMinusSrcAlpha
  17.  
  18. CGPROGRAM
  19. #pragma surface surf Lambert
  20.  
  21. struct Input
  22. {
  23. float3 viewDir;
  24. };
  25.  
  26. float4 _InnerColor;
  27. float4 _RimColor;
  28. float _RimWidth;
  29. float _RimGlow;
  30.  
  31. void surf (Input IN, inout SurfaceOutput o)
  32. {
  33. o.Albedo = _InnerColor.rgb;
  34. half rim = 1.0 - saturate(dot (normalize(IN.viewDir), o.Normal));
  35. o.Emission = _RimColor.rgb * _RimGlow * pow (rim, _RimWidth);
  36. }
  37. ENDCG
  38. }
  39. Fallback "Diffuse"
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement