Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiliMilk committed Jun 2, 2022
2 parents 2ee5b2e + 452bdb5 commit a45a420
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Assets/ChiliMilkToonShader/Include/ToonOutlinePass.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ struct Attributes
float4 tangentOS : TANGENT;
float2 texcoord7 : TEXCOORD7;
#endif
float4 color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
};

Expand Down Expand Up @@ -53,9 +52,9 @@ Varyings Vertex(Attributes input)
float3 bitangentDir = normalize(cross(normalDir, tangentDir) * input.tangentOS.w);
float3x3 t_tbn = float3x3(tangentDir,bitangentDir,normalDir);
float3 bakeNormal = GetSmoothedWorldNormal(input.texcoord7,t_tbn);
output.positionCS = TransformOutlineToHClipScreenSpace(input.positionOS, bakeNormal, _OutlineWidth * input.color.r);
output.positionCS = TransformOutlineToHClipScreenSpace(input.positionOS, bakeNormal, _OutlineWidth);
#else
output.positionCS = TransformOutlineToHClipScreenSpace(input.positionOS, input.normalOS, _OutlineWidth * input.color.r);
output.positionCS = TransformOutlineToHClipScreenSpace(input.positionOS, input.normalOS, _OutlineWidth);
#endif
return output;
}
Expand Down

0 comments on commit a45a420

Please sign in to comment.