We only show object center if object is selected, active or if viewport
has the "All Object Origins" options.
The viewport display options can migrate to renderlayer options.
However, we can mimic 2.7x as a compromise while the final design is
finalized.
We now floor the corner position and use this position as origin.
This gives us perfect derivatives in all cases even if very far from the origin.
Unfortunately this won't fix the low precision of coordinates used for computing the actual grid size, resulting in thick, non-smoothed lines.
Also did a bit of refactor how the axes are drawn.
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.
-Use 11_11_10 buffers for hdr content.
-Eevee compositing share 1 buffer if bloom and DOF are both activated.
-Fix slowdown when resizing EEVEE viewport.
-Removed DRW_BUF_*** enums causing confusion.
We should avoid casting from an int to a flag.
In this case it is probably fine, but if the OB_MODE_SCULPT
was too high it can overflow the bool.
(also adding explicit parenthesis to a flag check)
This add a new set of (possible) render settings that can be defined at
the scene level and overridable at the scene layer level.
Once we get workspaces we can either add workspace inbetween scene and
scene layer evaluation. Or to replace layer settings, to avoid extra
confusion to users.
An example of this setting is "samples", as implemented now for the clay
engine.
This fix doesn't really fix the situaion now because at the moment we
only flush the evaluated flags at DEG_OBJECT_ITER time, which is silly.
But it's all we can do until we have CoW.
So the parent visibility flag is not flushed. And even if we flushed its
visibility flag, we would need to rely on having the parent flag flushed
before we get to the object in question.
Anyways, take this commit as a future fix for when depsgraph comes to
rescue all our souls.
This implements weight rendering with the draw manager, with all drawing
options (Shading, wire, face masking, vertex masking).
This is part of T51208
Reviewers: campbellbarton
Subscribers: dfelinto
Differential Revision: https://developer.blender.org/D2654
Note: We should test if the armature is the "armature modifier" parent of the
object.
If any good samaritan feels like tackling this, the function to change
is: DRW_pose_mode_armature
Changing states didn't properly reset between shading groups
causing the GL state to be wrong based on draw order.
States are now only set when changed.