Object Mode: Grid: Allow more subdivision in orthographic views

2.7x was displaying 2 additional subdivision for theses views. Bumping to 3
just to say we improved it!
Hypothetically it can be increased as much as we want but float precision
can quickly become an issue.
This commit is contained in:
Clément Foucault
2018-10-30 16:44:02 +01:00
parent c4f69794ca
commit 87f4c83018

View File

@@ -502,6 +502,11 @@ static void OBJECT_engine_init(void *vedata)
}
else {
if (rv3d->view != RV3D_VIEW_USER) {
/* Allow 3 more subdivisions. */
grid_scale /= powf(v3d->gridsubdiv, 3);
}
float viewdist = 1.0f / max_ff(fabsf(winmat[0][0]), fabsf(winmat[1][1]));
grid_res = viewdist / grid_scale;