Age | Commit message (Collapse) | Author |
|
This is the unification of all overlays into one overlay engine as described in T65347.
I went over all the code making it more future proof with less hacks and removing old / not relevent parts.
Goals / Acheivements:
- Remove internal shader usage (only drw shaders)
- Remove viewportSize and viewportSizeInv and put them in gloabl ubo
- Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader
- Remove old (legacy) shaders dependancy (not using view UBO).
- Less shader variation (less compilation time at first load and less patching needed for vulkan)
- removed some geom shaders when I could
- Remove static e_data (except shaders storage where it is OK)
- Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...)
- Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing).
- Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU).
- Post AA to avoid complexity and cost of MSAA.
Remaining issues:
- ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~
- FXAA is not the best for wires, maybe investigate SMAA
- Maybe do something more temporally stable for AA.
- ~~Paint overlays are not working with AA.~~
- ~~infront objects are difficult to select.~~
- ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~
Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6296
|
|
Also remove historic bftgl reference.
|
|
|
|
Removed unused define in `edit_mesh_mode.c`
|
|
Unused framebuffers in `edit_mesh_mode.c`
|
|
Removed unused shading groups in `edit_mesh_mode.c`
|
|
|
|
Always show selected edges in wire/xray modes.
|
|
For clarity sake, the batch cache now uses exclusively per Loop attributes.
While this is a bit of a waste of VRAM (for the few case where per vert
attribs are enough) it reduces the complexity and amount of overall VBO
to update in general situations.
This patch also makes the VertexBuffers filling multithreaded. This make
the update of dense meshes a bit faster. The main bottleneck is the
IndexBuffers update which cannot be multithreaded efficiently (have to
increment a counter and/or do a final sorting pass).
We introduce the concept of "extract" functions/step.
All extract functions are executed in one thread each and if possible,
using multiple thread for looping over all elements.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D5424
|
|
T68035 by @luzpaz
|
|
The edit mesh is culled by object. When the object is not visible on
screen, the edit mesh may still be visible. This change will not cull the
edit mesh anymore.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5144
|
|
|
|
This make the xray & wireframe follows the same style as the solid
mode.
|
|
This was due to a double offset of the wireframe. We also reduce
the wireframe offset. The look of the wireframe overlay changes
a little with on distant wires.
|
|
|
|
This cleans up a bit of duplicated code and some confusion about
what was culled and what wasn't.
Now everything is culled based on the given object pointer.
If the object pointer is NULL there is no culling performed.
|
|
|
|
When XRay is turned on the mesh analysis did not draw correct. This
change won't draw the mesh analysis overlay when xray is turned on.
In terms of giving the user a visual feedback of this limitation we
render the overlay options inactive.
Reviewed By: brecht, fclem
Maniphest Tasks: T65225
Differential Revision: https://developer.blender.org/D4965
|
|
|
|
|
|
|
|
|
|
- Make edges darker in vert & face select mode (making more
contrast to not loose the topology). Downside is less select
edges visibility in vertex mode. But I'm confident that it's not
as painfull as it seems.
- Make select faces less saturated to have more color contrast
between select faces and edges.
- Make unselected faces white to increase contrast with faces and
edges. The brightening is negligeable for bright surfaces and
help readability on darker surfaces. Reminder that if the faces
overlays are too distracting (i.e: uv mapping, or texturing) they
can be toggled off in the overlay panel.
Reviewers: billreynish, campbellbarton, brecht
Reviewed By: billreynish, campbellbarton, brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D4941
|
|
|
|
This should be handled by DST.view_default
|
|
This will have multiple benefit.
TODO detail benefits (culling, more explicit, handling of clipping planes)
For now the view usage is wrapped to make changes needed more progressive.
|
|
This removes:
- DRW_STATE_TRANS_FEEDBACK
- DRW_STATE_WIRE
- DRW_STATE_POINT
|
|
|
|
|
|
This removes ModelViewProjectionMatrix usage
|
|
|
|
|
|
|
|
Enabling the drawing of the mesh analysis overlay.
Currently the settings are part of the scene toolsettings. What makes sense,
for 3d printing, but does not fit well with the per viewport blender 2.80
overlays.
Reviewers: brecht, fclem
Differential Revision: https://developer.blender.org/D4707
|
|
|
|
This removes the large edges and instead use colors to hint in which
selection mode the user is.
The component in each individual selection mode is more prominent to add
more emphasis. The other components are less prominent and dimmed.
A minor default theme changes needed to be made to keep clarity in all
combinations.
Forcing old behavior (no selection mode hit) could be done quite easily
by just making the 2 booleans true (selectFaces and selectEdges).
Reviewers: campbellbarton, billreynish
Reviewed By: campbellbarton, billreynish
Subscribers: ThinkingPolygons
Maniphest Tasks: T1234
Differential Revision: https://developer.blender.org/D4526
|
|
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
|
|
Edit mode shows the mesh elements in X-ray mode even if alpha is set to
1. Now the code takes this into account so that you can still select
visible mesh elements in X-ray edit mode.
view3d_draw_legacy need to be updated with the new XRAY flag macros to
avoid crashes. Additional cleanup of the XRAY macro flags were done.
|
|
frontside object in 3d-window
Now the depth order of objects when trying to select them is only used when not in X-ray mode.
Before, this was only the case in wireframe mode regardless of X-ray settings.
I've also unified the usage of V3D_XRAY and XRAY_FLAG as they were basically copies of each other.
Reviewed By: Clément
Differential Revision: http://developer.blender.org/D4504
|
|
Reviewed By: fclem
Maniphest Tasks: T62189
Differential Revision: https://developer.blender.org/D4593
|
|
Instead of doing some fancy stencil buffer tricks, just clear the depth
buffer before the "in front" meshes.
Fix T58841 Hidden Wire when in Edit Mode disables In Front Option
|
|
Most API's already use this convention.
|
|
|
|
Enable depth picking by default.
This adds new 'gpu_flag' since it's not so relevant to add GPU drawing
options into uiflag & uiflag2.
This resets the recently added smooth edge flag.
|
|
Requested by some users who prefer old wireframe precision.
Smooth wires are still enabled by defaults as they don't have a noticeable
perf impact.
Application restart is needed for changes to take effects.
|
|
Users who prefer to use face dot's don't get an advantage from drawing
thicker wire.
Requested by @ward
|
|
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.
|
|
Also compare clipping with the draw context instead of
accessing the RegionView3D, currently they're matching
but this might not always be the case.
|