Age | Commit message (Collapse) | Author |
|
This values was not working because was removed by error in refactor.
Reviewed By: mendio, fclem
Differential Revision: https://developer.blender.org/D8061
|
|
This was removed by error during the refactor done in 2.83.
Differential Revision: https://developer.blender.org/D7909
Reviewers: @fclem
|
|
Actually, the fade objects always fade to Black color, but this is not a good solution.
This patch fade the object to the viewport color.
Differential Revision: https://developer.blender.org/D7206
|
|
|
|
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.
Also, a huge code cleanup has been done at all levels.
Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.
Differential Revision: https://developer.blender.org/D6293
|
|
|
|
Reviewed By: brecht sergey jbakker
Differential Revision: http://developer.blender.org/D6729
|
|
Now when change the setting the strokes are recalculated.
To do this, it was necessary to move the UV recalc to BKE module in order to share with Draw Engine. If the recalc it was done in draw engine, the factor was only calculated for evaluated version and there was a problem when draw a new sytroke.
Now, the RNA parameter recalc the original datablock instead of tag for be calculated in Draw Engine.
|
|
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
|
|
The onion skin was nos displayed in secondary screens when disable the Onion switch or the Overlay in the main window.
Added a check to verify if the main overlay and onion switches are enabled in any screen in order to generate the cache data.
This is required to generate the onion skin and limit the times the cache is updated because the cache is generated only in the first screen and if the first screen has the onion disabled the cache for onion skin is not generated. The loop adds time, but always is faster than regenerate the cache all the times.
Reviewed By: mendio, pepeland
Differential Revision: https://developer.blender.org/D6049
|
|
Now the grid matrix is calculated when the shading group is created.
Also, the grid pass is only created when needed and reduce memory usage when the scene is not using grease pencil objects.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5966
|
|
This texture is used for missing textures as replace.
Differential Revision: https://developer.blender.org/D5845
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
Now the fade layer uses the same logic used to fade objects and also is available in all modes.
Reviewers: mendio, pepeland
Reviewed By: mendio, pepeland
Differential Revision: https://developer.blender.org/D5707
|
|
If the masks are disabled, the edit points must not visible.
|
|
|
|
Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place.
This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes.
Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data.
As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5470
|
|
Following the advices of @Germano Cavalcante (mano-wii) , I have exposed as a workaround the free function to be called from draw manager for selection.
Now, the free function is not called for selection inside gpencil draw_scene, but it's called from draw_manager.c.
The real fix would be create a new Scene_finish callback in draw manager, but as the release of 2.80 is almost here, we fix this with a workaround that must be removed when new callback is in place.
Differential Revision: http://developer.blender.org/D5193
|
|
The old name was not meaning what this option does. Dtected while writting the manual.
|
|
The prefix DRW_ must be used only for modules inside Draw Manager and not in the Engines.
|
|
Grease Pencil already reset the default view so the draw_manager wouldn't assert. During multi view rendering the same assert still happened. This patch will reset the default view when starting to render a new view.
Reviewers: fclem
Differential Revision: https://developer.blender.org/D5137
|
|
Following @fclem comments, I have implemented the use of Stencil for Solid line strokes. For Dots, Boxes and Lines with texture, the stencil is not activated because "kill" some artistic effects.
We have done test in greasepencil-object branch and all it's working as expected and the FPS are equal, so the stencil hasn't any appreciable impact in the drawing time.
The Stencil is used in groups of 255 and the passes are done in the same way. If the stencil is not use for the type of stroke (Dot/Box/Texture), the drawing is grouped as much as possible to reduce GPU overhead and limit the times the stencil bit must be cleared.
For doing this patch I had to add 2 new functions for reading private data to Draw manager. We decided add these function as a temporary solution while the Draw Manager implements the option to clear the stencil by groups. When this option will be implemented, these functions must be removed.
Thanks to Clément for his help and support. It's always a pleasure working with him.
Review by: @fclem
Testers: @mendio @pepeland
See D5126 for more details
|
|
|
|
flickering
There were some problems in the engine because the data was saved inside e_data struct, but this struct is reset sometimes and the background texture is not valid.
Now, the data has been moved to stl->g_data and all creation and free has been moved to use stl->g_data. This fix also some small memory leak for the Buffer GPUBatch data.
The background texture has been moved to texture list because must be available all the time. When is not drawing, the texture is removed to safe memory. Also, if the mode is painting and the texture is not ready because it was removed by Draw Manager, the texture is reloaded with the background image again. This ensure the background image is always visible when painting.
Also I have used this patch to reduce the size of texture used for background to 16F instead of 32F and the blank texture to 1x1 pixels instead of 16x16.
Reviewed by: @fclem
See D5115 for more details
|
|
The opacity was already used and using it in the shader only duplicate the blend.
|
|
|
|
When passing NULL to DRW_shgroup_call(), ModelMatrix is assumed
to be unitmat.
|
|
Now the matrix is copied when creating shading group and don't need to be saved in storage.
|
|
|
|
The old name was not clear and with new options the new name is more easy to understand.
|
|
New option to disable the follow drawing path. Before it had only a switch property, now there is a list of options.
Modes:
Path: Follows drawing stroke and rotate with object.
Object: Only follows object rotation.
None: Don't rotate.
|
|
Apply same change done to fix the task T64373
|
|
By default the texture is locked and only the box is aligned when Follow Drawing Path is enabled.
Before, when the Follow was disabled, the texture was always aligned to top and it was not affected by object rotation. Now, the texture always is rotated with object rotation.
|
|
This was already supported in Fill, but not in Strokes. This adds more artistic options when use textured strokes.
|
|
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
|
|
This commit adds support for drawing Dots strokes with a gradient factor to get artistic effects like watercolor.
Currently, the option is only supported by Dots materials, and in the future will be added to line strokes, but now there is a limitation on drawing engine and we will keep disabled on Line materials.
Also, added the option to align Dots and Boxes strokes textures aligned with the drawing path to get more fluid strokes.
|
|
|
|
When the object view is set to Wireframe, the display must be set as wireframe view with x-ray on.
Now the x-ray switch is handled by object.
|
|
The crash was detected in draw_manager, but the real problem was a wrong pointer that corrupted the struct, so the free function failed.
Redesign this area to keep pointer correct all the time.
|
|
In previous commit introduced this bug. The flag was inverted and the mode was not working.
|
|
There was a conflict between Object "In Front" and how the strokes were managed in Stroke panel for grease pencil datablock.
In order to keep consistency, the order of the object has been moved to Object level and now it's using the standard "In Front" flag. As all it is 3D, the option "Back" has been removed.
This also fixes the problem with task T62137.
Also related to commit 54ffc4e19dc4 and D4405
|
|
There was a bug when selected Solid mode with Material or Texture mode. The textures were not visible.
Now, the mode is passed to shaders to decide if use the solid color or the result texture color. The mode is passed using an array with shading type and mode.
|
|
The outline now has some alpha to be more consistent with other Blender areas.
|
|
Now an outline is drawn when the grease pencil is selected.
|
|
|
|
When instance objects linked, the name could not be unique.
|
|
This reduces the loop time if the scene is not using instances.
|
|
|