Last active
December 18, 2019 19:45
-
-
Save quizcanners/6c7181b404a8bffd6a4f99eac6c8a566 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Transparency | |
alpha:fade // Means it is not a glass | |
Tags { "Queue" = "Transparent" "RenderType" = "Transparent" } | |
ZWrite Off | |
Blend SrcAlpha OneMinusSrcAlpha | |
// Adjusting strength of the Normal | |
o.Normal = UnpackNormal(bump0); | |
o.Normal.xy *= wet; | |
o.Normal.z = 1; | |
o.Normal = normalize(o.Normal); | |
// Providing vertex data | |
#pragma surface surf SurfName vertex:vert | |
struct Input { | |
float3 wNormal; | |
}; | |
void vert (inout appdata_full v, out Input data) | |
{ | |
UNITY_INITIALIZE_OUTPUT(Input,data); | |
data.wNormal = mul((float3x3)_Object2World, v.normal)); | |
} | |
void surf (Input IN, inout SurfaceOutput o) {} | |
// Getting World Normal | |
float3 worldNormal; INTERNAL_DATA // Input | |
WorldNormalVector(IN, o.Normal); // surf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment