Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-25Mesh: skip conversion from edit-mesh to mesh in edit-modeCampbell Barton
This resolves a performance regression in 2.8x where every edit-mode update performed an edit-mesh to mesh conversion. Now the conversion will be lazily initialized if/when it's required. New BKE_mesh_wrapper_* functions abstract over mesh data access. Currently only edit-mesh and regular meshes are supported. In the future sub-surface meshes may be supported too.
2020-04-30Task: Use TBB as Task SchedulerBrecht Van Lommel
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor. Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance. * Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend. * AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D7475
2020-04-27Fix T76131: Crash combing Hair using PythonPhilipp Oeser
Caused by rBe82827bf6ed5. DRW_draw_depth_object calls DRW_mesh_batch_cache_create_requested with NULL scene, but that is accessed later on... Scene is actually available, so pass that around. Maniphest Tasks: T76131 Differential Revision: https://developer.blender.org/D7540
2020-04-16Fix T75567: Paint Mode Wireframe IncorrectJeroen Bakker
The loop normal VBO is used in two manners. In edit mode to draw the edge normals. And in paint mode to draw the wireframe. This commit checks which VBO is needed and build the correct one. This allows show the wireframe correct in paint mode, when the object is subdivided. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7419
2020-04-09TaskScheduler: Minor Preparations for TBBBrecht Van Lommel
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636} Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0} Differential Revision: https://developer.blender.org/D7385
2020-04-07Fix T75343: Wireframe overylay is not working properly with multiple modifiersPhilipp Oeser
Since rBcf258b02f449, only wires and edges that are mapped to the original mesh were drawn if the mesh was modified by modifiers. Above commit was only meant for showing orig wires for paint mask overlays [where final wireframe is not desired], so now only use MR_EXTRACT_MAPPED when we are in a paint mode. Maniphest Tasks: T75343 Differential Revision: https://developer.blender.org/D7333
2020-04-03Cleanup: use term 'attr' instead of 'attrib'Campbell Barton
This was already the case in most parts of the GPU API. Use full name for descriptive-comments.
2020-03-31Fix T75244: Screw Modifier CrashJeroen Bakker
Draw batch extraction wrongly assumed that when mapped extraction happened that all original data could be found. This is not the case as mapped extraction is also enabled when part of the data is present. This fix does additional nullptr checks.
2020-03-30NormalOverlay: Center Dot Normal Drawing With ModifiersJeroen Bakker
When using generative modifiers too many center dots were rendered in the normal overlay. This patch only renders the normals of original center dots. Known issue: decoding the `norAndFlag` has issues on Intel GPU.
2020-03-30Normal Overlay: Hide Normals Of Generated LoopsJeroen Bakker
The loop normals were always drawn. We used to only draw the normals if it was mapped to an original loop of the mesh. Due to recent changes we can not find the correct loop and decide if we need to draw them. Note still need to check the face dots normals. This is more complicated as facedot normals needs to be encoded in a different way
2020-03-30Fix T75053: Paint Overlay Show Modified Wires and EdgesJeroen Bakker
The paint mask overlay showed the wires and edges of the final mesh. This change will only draw wires and edges that are mapped to the original mesh. This change enables mapping data in regular Mesh extraction. This can also be used for better drawing of the normal overlay. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7277
2020-03-23Revert "COW: Edit Mesh: Do not copy the looptris pointer"Germano Cavalcante
The looptri is repeated in the linked Meshes but the pointer is only referenced in the evaluated ones. This reverts commit 64982e213f014123d1b0406cf9ae893910a6a3d3.
2020-03-23COW: Edit Mesh: Do not copy the looptris pointerGermano Cavalcante
No functional changes. Differential Revision: https://developer.blender.org/D7173
2020-03-20Fix T74643: Outline Overlay Shows Hidden FacesJeroen Bakker
When in editmode faces can be hidden, but in object mode these faces are still visible. The flag if a face was hidden in edit mode is stored in object mode, but should not be used. The edge detection gpu batch did detect hidden faces and didn't add them to the draw batch. The edge detection gpu batch is used for workbench shadows, custom bone shapes and object outlines. This patch adds all faces to the edge detection batch. Reviewed By: fclem Differential Revision: https://developer.blender.org/D7157
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: spellingCampbell Barton
2020-03-18Weight Paint: Implement a new Lock-Relative mode.Alexander Gavrilov
This check box alters how weights are displayed and painted, similar to Multi Paint, but in a different way. Specifically, weights are presented as if all locked vertex groups were deleted, and the remaining deform groups normalized. The new feature is intended for use when balancing weights within a group of bones while all others are locked. Enabling the option presents weight as if the locked bones didn't exist, and their weight was proportionally redistributed to the editable bones. Conversely, the Multi-Paint feature allows balancing a group of bones as a whole against all unselected bones, while ignoring weight distribution within the selected group. This mode also allows temporarily viewing non-normalized weights as if they were normalized, without actually changing the values. Differential Revision: https://developer.blender.org/D3837
2020-03-06Cleanup: use 'BKE_' prefix for BKE_deform API callsCampbell Barton
- Use 'BKE_object_defgroup' prefix for object functions. - Rename 'defvert_verify_index' to 'defvert_ensure_index' since this adds the group if it isn't found.
2020-03-04Cleanup: replace CLAMP macros with functionsCampbell Barton
2020-02-20Fix T74019 Eevee High Quality Normals causing pitch black facesClément Foucault
Was due to a mistake when removing previous code...
2020-02-19DRW: New High Quality Normal & Tangent extractClément Foucault
This patch adds a dedicated path to extract 16bit normals instead of packing them into 10bits/comp. The tangents are also packed to 10bits/comp if not using the new High Quality Normal option. Fix T61024 Degraded texture shading on dense meshes Reviewed By: brecht Differential Revision: https://developer.blender.org/D6614
2020-02-17Fix T73518: Normal OverlayJeroen Bakker
This change will not render the normals for faces that are hidden. Before we had instance drawing the hidden faces were registered in the index buffer. During the overlay refactoring the rendering was migrated to instance rendering. Instance rendering does not use the index buffer so the data was ignored. This patch stored the normal visibility in the .w part of the normal or for face normals it will set the normal to zero. The shader looks at this and renders the normals fully transparent when detected. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D6798
2020-01-17DRW: Use USHORT for vertex color and upload them in linear color to the GPUClément Foucault
This way we remove the need for the srgb boolean uniform and a lot of code complexity. However, mesh update is going to be a bit slower. I did not benchmark the performance impact. This also fix a typo in draw_cache_impl_particles.c and fix hair not using vertex color in workbench. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6610
2020-01-08Fix T72119: UV/Image Editor theme face colors with no effectmano-wii
The `in int flag;` in `gpu_shader_2D_edituvs_faces_vert.glsl` don't have the values `FACE_UV_ACTIVE` and `FACE_UV_SELECT`. Add face flags then. Original patch is from @EitanSomething Differential revision: https://developer.blender.org/D6520
2020-01-08Fix T72667: Collection delete hierarchy in edit-mode crashesCampbell Barton
Also resolves T72848, although updating multiple windows doesn't work, this matches 2.7x behavior.
2020-01-07BMesh: remove BMEditMesh.ob use for draw managerCampbell Barton
2019-12-30Fix T72788: Crash Edit Custom Bone ObjectJeroen Bakker
In a recent refactor we splitted the lines extractor in `extract_lines` and `extract_lines_loose`. When an object is in edit mode the extracted lines loose also had to include a dummy bmesh edge iterator. This change adds this missing dummy method. Reviewed By: antoniov Differential Revision: https://developer.blender.org/D6499
2019-12-19Fix T72236: UV Stretching OverlayJeroen Bakker
The ratio for area stretching was packed into an unsigned int, but could contain negative numbers. This flipped the negative numbers to high positive numbers and rendered the wrong color in the stretching overlay. I can remember during {T63755} I had to flip the sign to get the correct result, but couldn't find out why that was needed. Now I know. Reviewed By: fclem, mano-wii Differential Revision: https://developer.blender.org/D6440
2019-12-05Fix T72175: DrawManager Crash Large ObjectsJeroen Bakker
Introduced by 9c337fcfe2a4 mistaken that `MeshExtract.use_threading` set to false means that no threading is used at all. This is not the case it will still perform threading for large objects, it will only run the different subtasks in serial. Fixed by scheduling the `lines_loose` in the task_pool after the rest have been executed. This is cleaner than the previous implementation as it sticks more to the actual design.
2019-12-04Fix T72130: Wireframe Visible After DisablingJeroen Bakker
The lines index buffer can contain all edges (edit mode) or only loose edges (object mode). When switching between these modes the wrong content of the index buffer can be used. This patch will clear the lines index buffer when a `loose_edges` is requested. Making sure it is always up to date. Note that this is supporting an exising hack where the IBO is truncated during the creation. We should find a different way how to solve these kind of issues. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6349
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
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
2019-11-08Fix T71194: UV Face centers wrong location with sub-surface meshCampbell Barton
2019-11-06Fix T71319, T71015: crash in edit mode with out of range material assignmentsBrecht Van Lommel
2019-10-16Fix assert and memleak in recent Skin Root Display patchClément Foucault
Caused by 4ddf3215a7df
2019-10-16Fix T68380 Skin modifier root not displayedClément Foucault
2019-10-08Fix T68857 EditUV: Crash on Remesh modifier with 'Display in Edit Mode'Clément Foucault
2019-10-01Fix T70206 Texture Paint: UV shadow doesnt show upClément Foucault
2019-09-21Cleanup: extra semicolon, comma warningsCampbell Barton
2019-09-13Cleanup: unused headers (GPU)Campbell Barton
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-09-05Mesh Batch Cache: Fix threading issueJacques Lucke
I believed the crash I experienced happened because: 1. The `extract_pos_nor_init` function is called. 2. Tasks are added to the task pool for `extract_pos_nor`. 3. The tasks begin to be executed while more tasks are added. 4. In some rare cases, all existing tasks are finished, but not all have been added yet. 5. This let the task-counter go down to zero. 6. This triggered a call to `extract_pos_nor_finish`. 7. Then more tasks are added and in the end `extract_pos_nor_finish` is called again. A solution is to use a task pool that is suspended when created. Unfortunately, there was an outdated comment, that was probably the root cause of the issue. Reviewers: fclem, sergey Differential Revision: https://developer.blender.org/D5680
2019-09-04Fix T63755: Area Stretching OverlayJeroen Bakker
Support for UV Stretching overlay during multi object editing. The VBO now holds the ratios per fase. In the shader these ratios will be compared against the global ratios. The global rations are created from all selected objects. The current implementation does not fit well with the draw module. The plan is to move the drawing of other spaces towards the draw manager what leads to a better fit. Currently the details on this solution is unclear but this requirement will become an attentionpoint in the future design. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5665
2019-08-30DrawManager: UV StretchingJeroen Bakker
Calculating UV Stretching on large meshes showed garbage. The reason is that the calculation is not thread save. Temporarily disable threading for UV Stretching
2019-08-27Clean: styleCampbell Barton
2019-08-26Fix T69051 Vertex Paint: Selection not show in vertex select mode.Clément Foucault
2019-08-26Fix T68954 UVEdit: Auto Smooth option conflicts with uvs displayClément Foucault
2019-08-22Cleanup: undeclared variable warningsCampbell Barton
Forward declare variables, or make them static.
2019-08-18Mesh Batch Cache: Fix regression with mesh that have poly mat id > mat_lenClément Foucault
2019-08-17Cleanup: spellingCampbell Barton
2019-08-16Cleanup: spellingCampbell Barton