Age | Commit message (Collapse) | Author |
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
Instead of doing manual ray-plane intersection we use normalized positions
of the grid mesh and apply scaling after interpolation so that we keep
good precision even at really far distances.
Precision is now two order of magnitude better and does not produce the
same kind of artifact at lower clip start values.
This commit also cleanup the implementation.
Fixes T58918 Grid not appearing correctly at low clip start in 2.8
|
|
This was a bug that was making the grid drawing even more slower than it
is.
|
|
|
|
This adds a custom depth test that have the benefits to glitch less and be more visually pleasing.
Downside is that it let the grid pass trough the objects a little.
This effect is done in NDC space so that it counteract the logarithmic depth distribution imprecision (read as it's less visible near the camera but more present far away).
This patch also includes some cleanups.
|
|
Do not use the inverse perspective matrix inside the shader to recover world positions.
That leads to severe float imprecision leading to nasty artifacts.
Instead we compute the world view vector for each pixels and do a ray to plane intersection.
We are still getting low precision derivatives when going far away from the origin, and thus artifacts.
This commit also fixes the non-appearing negative Z axis in 3D view.
|
|
Fix wrong coord picked when display only one axis.
Small optimizations here and there.
|
|
Removed infinite details and went for decreasing details with the distance instead (like the axis aligned ortho view auto sized grid).
Separate drawing of the Z axis into 2 pass (using shading group) to render ordered transparency with the main grid pass.
|
|
|
|
Move the grid drawing to the Object mode engine and implement a new infinite grid.
Everything is done but it needs better parameters to be intuitive.
|