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
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
Curve edit points could disappear when the deformed curve is out of view
area. Fix similar to rB0f983e854052.
Reviewers: jbakker
Maniphest Tasks: T69687
Differential Revision: https://developer.blender.org/D5748
|
|
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
Differential Revision: https://developer.blender.org/D3744
|
|
|
|
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.
|
|
|
|
|
|
|
|
This should be handled by DST.view_default
|
|
This removes:
- DRW_STATE_TRANS_FEEDBACK
- DRW_STATE_WIRE
- DRW_STATE_POINT
|
|
|
|
Goal is still to simplify the draw manager.
|
|
This removes ModelViewProjectionMatrix usage
|
|
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
|
|
|
|
Create a new pass for them and draw them separately.
Beware of the double multisample resolve when multi-editing a mix of curves
with and without the "in front" option enabled.
|
|
|
|
Also move view_ubo into G_draw.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Also compare clipping with the draw context instead of
accessing the RegionView3D, currently they're matching
but this might not always be the case.
|
|
The struct name is descriptive,
this isn't going to be confused with other variables.
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
|
|
Add 'G_draw' for all draw manager globals,
avoids adding extern to each file.
Connection between `ts` and `globals_ubo` wasn't obvious,
now called `G_draw.block` & `G_draw.block_ubo`.
|
|
Shaded triangles are not yet implemented (request from gpumaterials).
This also changes the mechanism to draw curve normals to make it not
dependant on normal size display. This way different viewport can
reuse the same batch.
|
|
|
|
|
|
It's so similar in practice that we don't need a separate engine for edit
surface overlays.
|
|
|
|
|
|
Now handles are drawn using index buffer instead of duplicating memory
requirement.
Also make use of shader tricks to draw handles antialiased, and respond to
UI scalling.
Make vertex point match edit mesh vertex size.
|
|
|
|
This commit add one regression: it is impossible to currently hide handles
in the viewport. But this should be fixed in another commit.
|
|
|
|
|
|
|
|
Selection is no longer needed for an object to be considered in a mode.
Part of T55246 design task, fixes T55187
|
|
|
|
|
|
For some we may add per object overrides, but for most we plan to keep them
strictly per viewport settings. Display settings from the mesh still need to
be moved here, only collections were done to remove that code.
|
|
|
|
Because:
- Less redundancy.
- Better suffixes.
Also a few modification to GPU_texture_create_* to simplify the API:
- make the format explicit to the texture creation process.
- remove the component count as it's specified in the GPUTextureFormat.
|
|
This adds initial multi-object editing support.
- Selected objects are used when entering edit & pose modes.
- Selection & tools work on all objects however many tools need porting
See: T54641 for remaining tasks.
Indentation will be done separately.
See patch: D3101
|
|
Part of larger change to remove this variable entirely.
|