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
|
|
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6080
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D5092
|
|
Centralize logic for when to use the PBVH for drawing, fix missing tests in
mask drawing, fix missing tests for multiple windows, only do more expensive
update for all viewports at end of the stroke.
|
|
|
|
|
|
This removes ModelViewProjectionMatrix usage
|
|
|
|
Workbench/Eevee now displays multiple multi-materials correctly.
Iterate over pbvh nodes when doing object iteration. This makes the
rendering process more streamlined and allow for using different materials.
This change will make possible to:
- Add culling pass of each pbvh leaf node. (speedup if zoomed on a small
area)
- Reduce number of lead node iteration.
- Reduce code complexity
|
|
|
|
Currently it is not possible to view the vertex colors of an object. To
optimize the workflow, workbench will need to support Vertex Colors.
The Vertex Colors is a new option in `shading->color_type`. When objects
do not have vertex color, the objects will be rendered with the
`V3D_SHADING_OBJECT_COLOR`.
In order to support vertex colors in workbench the current texture/solid
shading structure is migrated to a primary shaders and fallback shaders.
Fix: T57000
Reviewers: brecht, fclem
Differential Revision: https://developer.blender.org/D4694
|
|
This matches vertex/texture paint opacity options.
Useful because 0.75 is sometimes too dark to see the surface shading.
Resolves T63746
|
|
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
|
|
|
|
In fact, any modifier on top of multires would lead to crash.
Was missing pointer update.
Basically, bring the control flow closer to 2.7.
|
|
Also move view_ubo into G_draw.
|
|
On CCG side it is done similar to displacement, where we have
a dedicated functor which evaluates displacement. Might be seemed
as an overkill, but allows to decouple SubdivCCG from mesh entirely,
and maybe even free up coarse mesh in order to save some memory.
Some weak-looking aspect is the call to update normals from the
draw manager. Ideally, the manager will only draw what is already
evaluated. But it's a bit tricky to find a best place for this since
we avoid dependency graph updates during sculpt as much as possible.
The new code mimics the old code, this is how it was in 2.7.
Fix shading part of T58307.
|
|
Removes the flat shader variant since the attrib is specified for each vert
loop in flat shaded mode. It was something leftover from the previous
implementation.
|
|
This introduce the wireframe batches. Creating the indices buffer does
not seems to slow down the sculpt in my testing (but it is kind of hard to
test reliably)
This includes a bit of cleanup in gpu_buffers.c.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
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.
|
|
|
|
|
|
|
|
* Remove support for diffuse color in the pbvh buffers.
* Upload raw data to GPU.
* Only draw nodes that have mask data when drawing the overlay.
This should fix T56466
|
|
|
|
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.
|
|
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
|
|
This way we don't have to re-initialize the full evaluation
context in every area we need it.
|
|
For simplicity we choose to execute the rendering of Opengl engines in the main thread and block the interface.
This might be addressed in the future at least for video rendering.
A drawmanager wrapper (DRW_render_to_image) is called by the render pipeline to set up the Opengl state and then call the specific draw_engine->render_to_image function.
|
|
Similar to previous commit in Eevee.
|
|
This makes updates for the viewport cleaner and also add the possibility to add a new callback called when the scene is updated.
|
|
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
|
|
Modes often need to check if the object is the active one.
|
|
-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.
|
|
|
|
|
|
Only mask are handled by sculpt mode engine and are multiplied on top of the render.
There is room for improvement:
- Shaded meshes don't have correct tangents or uvs.
- Masks are in range 0.8 - 0.2 thus always darkening at least 20% the render.
- It only uses the first material slot of the mesh.
|
|
Add a shader-group type to draw
generated geometry by running a callback.
|
|
Currently only uses the simple shader.
|
|
Also remove from pass list (there were some duplicate unused entries).
|
|
|
|
Same as MEM_SAFE_FREE macro,
checks for NULL, runs free then sets NULL.
Blocks of code that do this many times are noisy and likely
errors here wouldn't be noticed immediately.
Also NULL's static vars which were being left set.
|
|
This removes MAX_STORAGE, MAX_BUFFERS, MAX_TEXTURES, MAX_PASSES limits.
Actual memory saving isn't so important, it just means we don't need to
manually bump these based on changes to engines.
|
|
Avoid confusion for non mesh types where verts/wire/surface might apply.
Other object types use this convention already.
|
|
|
|
Faster search
|