Skip to content

Commit

Permalink
Merge pull request #101 from Santarh/maintainTimeFloatPrecision
Browse files Browse the repository at this point in the history
_Time maintains float precision.
  • Loading branch information
Santarh authored Aug 27, 2020
2 parents 79569d5 + 77117be commit cd983ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MToon/Resources/Shaders/MToonCore.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ float4 frag_forward(v2f i) : SV_TARGET
float2 mainUv = TRANSFORM_TEX(i.uv0, _MainTex);

// uv anim
half uvAnim = tex2D(_UvAnimMaskTexture, mainUv).r * _Time.y;
float uvAnim = tex2D(_UvAnimMaskTexture, mainUv).r * _Time.y;
// translate uv in bottom-left origin coordinates.
mainUv += float2(_UvAnimScrollX, _UvAnimScrollY) * uvAnim;
// rotate uv counter-clockwise around (0.5, 0.5) in bottom-left origin coordinates.
Expand Down

0 comments on commit cd983ea

Please sign in to comment.