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
|
|
BIF_gl.h included hacks like redefining glew functions and a constant.
The named constant `GLA_PIXEL_OFS` has been moved to `GPU_viewport.h`
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5860
|
|
|
|
mode particle shaders
For `Particle Properties -> Viewport Display -> Display As` set to
circle/cross/axis, particle instances are associated with a single
resource handle (and, in particular, a single model matrix), so define
`IN_PLACE_INSTANCES` to get the right index for `ModelMatrix` and
`ModelInverseMatrix` in the shader.
Differential Revision: https://developer.blender.org/D6220
|
|
|
|
As reported by Clément Foucault. This is a small thing but since we
are refactoring the draw manager for the next blender is nice to
have it fully working before the refactor for comparison.
Note: Camera volume and render were both fine, the camera frame is the
one thing that was not working.
Also in toe-in the convergence plane is always facing the original
camera orientation. It is a known small annoyance.
|
|
|
|
Offset now matches Blender 2.7x.
|
|
|
|
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6080
|
|
When displaying the voxel size for an adaptive domain the resolution of the adaptive domain was used to calculate the world size of the voxel.
This patch changes this to use the initial size of the domain.
When using adaptive domain the overlay was not rendered in the right
place.
Thanks to sebbas for part of the patch!
Reviewed By: sebbas, fclem
Differential Revision: https://developer.blender.org/D6076
|
|
When displaying the voxel size for an adaptive domain the resolution of the adaptive domain was used to calculate the world size of the voxel.
This patch changes this to use the initial size of the domain.
When using adaptive domain the overlay was not rendered in the right
place.
Thanks to sebbas for part of the patch!
Reviewed By: sebbas, fclem
Differential Revision: https://developer.blender.org/D6076
|
|
Also remove historic bftgl reference.
|
|
|
|
|
|
|
|
|
|
|
|
Camera background images were not shown under transparent objects.
This patch performs an alpha under for background images for cycles.
In order to see the difference the Film transparency needs to be turned on.
Note that workbench and EEVEE still needs to be adapted as they don't
write store alpha value in the viewport.
Side note. This implementation is already an improvement of the current behavior, what users are requesting. (Show background images underneath cycles viewport rendering.) It is clear that this patch still needs to be extended to workbench and eevee. For now that should be marked as a known limitation.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5437
|
|
|
|
Seems to be an issue with OSX and loading objects matrices from uniform
buffers.
Using legacy path for that reason.
|
|
|
|
Removed unused define in `edit_mesh_mode.c`
|
|
Unused framebuffers in `edit_mesh_mode.c`
|
|
Removed unused shading groups in `edit_mesh_mode.c`
|
|
|
|
These were only strictly valid for texture space calculation, don't store them
since they should not be used after that. Only store a flag to indicate if the
auto texture space has been evaluated.
In the future it might make sense to store bounding boxes at the mesh level to
speed up bounding box computation for multiple objects using the same mesh, but
then it will need to be implemented differently.
|
|
|
|
This solution only reuses the performance workaround made for Intel.
But the original problem was not solved.
Not much we can do to solve it.
|
|
|
|
Make a distinction between flush sculpt changes for rendering, and forcing
sculpt data structures to be rebuilt after mesh changes. Also don't use PBVH
for renders.
|
|
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
|
|
|
|
|
|
|
|
|
|
Always show selected edges in wire/xray modes.
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
The vertex shaders depth offset was ignored in this case.
|
|
|
|
This replaces temporarily enabling draw-axis.
|
|
Only some options need this.
|
|
This is a step to finish the D4325 and fix the T61286.
Currently the grid is highlighted in steps of 10 out of 10, which is wrong for the imperial units as seen in `buImperialLenDef`.
The idea of the code is to pass the steps of the grid already dimensioned as a uniform.
Another important thing to note is that subdivisions now only affect the grid without unity.
This matches the 2.7x Blender versions.
No performance loss (almost no gain too).
Reviewers: fclem
Subscribers: zlsa, rl.amorato
Differential Revision: https://developer.blender.org/D4379
|
|
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
|
|
When using Vertex or Weight paint mode on a wireframe the overlay was
blended with the background. In this case we now use alpha blending.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5340
|
|
The matrices that projects background images in the 3d view
were incorrect. The root cause was that the coordinate systems were not
respected, that was most noticeable when rotating a stretched image.
We re-validated conversions of coordinate spaces (UV -> Image -> Camera -> Window)
and made sure that the rotation is done in image space.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D5431
|