Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #186 from Henry00IS/BrushPreview
Browse files Browse the repository at this point in the history
Fixed projected grid scaling issue
  • Loading branch information
Henry00IS authored Nov 11, 2018
2 parents 63b2c0c + 5245394 commit 5b0d83b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Internal/Shaders/BrushPreview.shader
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Shader "SabreCSG/BrushPreview"
worldNormal.z = (worldNormal.z > worldNormal.y && worldNormal.z > worldNormal.x)?1:0;

float3 worldspace = IN.worldPos;
worldspace -= _GridThickness * 0.5;
worldspace -= (_GridThickness * _GridSize) * 0.5;

float2 grid = float2(
(worldspace.z * worldNormal.x) + (worldspace.x * worldNormal.z) + (worldspace.x * worldNormal.y),
Expand Down

0 comments on commit 5b0d83b

Please sign in to comment.