Skip to content

Commit

Permalink
Add comment on AssetGridItem.Magnetize; Rename listClipFrag to listCl…
Browse files Browse the repository at this point in the history
…ipCheckExtents
  • Loading branch information
schoen committed Sep 16, 2016
1 parent d6a4363 commit 864d6ba
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Manipulators.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Manipulators/Materials.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Workspaces/Project/Scripts/AssetGridItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ private void OnGrabStarted(BaseHandle baseHandle, HandleEventData eventData)
StartCoroutine(Magnetize());
}

// Smoothly interpolate grabbed object into position, instead of "popping."
private IEnumerator Magnetize()
{
var startTime = Time.realtimeSinceStartup;
Expand Down
2 changes: 1 addition & 1 deletion Workspaces/Project/Shaders/ListClip.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void listClipVert(inout appdata_full v, out Input o)
o.localPos = listClipLocalPos(v.vertex);
}

void listClipFrag(float3 localPos)
void listClipCheckExtents(float3 localPos)
{
// Clip if position is outside of clip bounds
float3 diff = abs(localPos);
Expand Down
2 changes: 1 addition & 1 deletion Workspaces/Project/Shaders/ListClip.shader
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

void surf (Input IN, inout SurfaceOutputStandard o)
{
listClipFrag(IN.localPos);
listClipCheckExtents(IN.localPos);

fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
c *= _Color * c.a;
Expand Down
2 changes: 1 addition & 1 deletion Workspaces/Project/Shaders/ListClipText.shader
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

void surf(Input IN, inout SurfaceOutputStandard o)
{
listClipFrag(IN.localPos);
listClipCheckExtents(IN.localPos);

o.Emission = IN.color;
o.Alpha = tex2D(_MainTex, IN.uv_MainTex).a * IN.color.a;
Expand Down
2 changes: 1 addition & 1 deletion Workspaces/Project/Shaders/ListClipTransparent.shader
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

void surf(Input IN, inout SurfaceOutputStandard o)
{
listClipFrag(IN.localPos);
listClipCheckExtents(IN.localPos);

fixed4 c = tex2D(_MainTex, IN.uv_MainTex) *_Color;
o.Emission = c.rgb;
Expand Down

0 comments on commit 864d6ba

Please sign in to comment.