Noticed that the major gridlines jump around often when using low snap values such as 0.2
Upon investigation, it seems to be caused by floating point errors in the snap value leading to the highlightOffsetTan and Bitan in DrawFullGrid of ProGrids\Editor\pg_GridRender.cs sometimes being incorrect.
This is very noticeable if you force the pivot to be 0,0,0 and have snap of 0.2 or 0.3 or 0.24 for example - the major gridlines jitter one increment towards the negative axis at certain camera angles (varying iterations) instead of staying aligned to the origin. Changes less often in locked mode, but still gets incorrectly offset.
For reference, I'm currently using progrids version 2.3.0f0 though I encountered the issue in prior versions too.
Here's a hacky fix which makes the grid stable for me in the meantime:
private static float MyMod(float a, float inc, float maj )
{
float newb = (inc + 0.0000001f) * maj;
float r = a % newb;
return r < 0 ? r + newb : r-newb;
}
private static void DrawFullGrid(
...
int highlightOffsetTan = (int)(MyMod(pg_Util.ValueFromMask(start, tan), inc, majorLineIncrement) / inc);
int highlightOffsetBitan = (int)(MyMod(pg_Util.ValueFromMask(start, bitan), inc, majorLineIncrement) / inc);
//int highlightOffsetTan = (int)((pg_Util.ValueFromMask(start, tan) % (inc * majorLineIncrement)) / inc);
//int highlightOffsetTan = (int)((pg_Util.ValueFromMask(start, bitan) % (inc * majorLineIncrement)) / inc);
Another bug I found was the offset would be different if the start of the grid was positive vs negative.
(Fixed in my hack by checking <0 in return)
This second bug also affects the DrawHalfGrid function of the perspective grid view.
Hope this info helps - Thanks for these handy tools!