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-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-03-05Sculpt Face SetsPablo Dobarro
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces. This initial commit includes: - Sculpt Face Sets data structures and PBVH rendering. - Face Set overlay and opacity controls. - Sculpt Undo support. - Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing. - Automasking and Mesh filter support. - Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding). - Sculpt Mode Face Sets and Visibility API. - Sculpt Face Sets creation and visibility management operators. - Operator to randomize the Face Sets colors. - Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke. - Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide). - Pie menu on the W key with Face common Sets operations. Know limitations: - Multires support. The Face Sets and Visibility API needs to be implemented for Multires. Reviewed By: jbakker, #user_interface, Severin Differential Revision: https://developer.blender.org/D6070
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
2019-10-09Sculpt: Fix wireframe drawingPablo Dobarro
With this commit sculpt mode draws the real mesh wireframe instead of the triangulated version by ignoring non real edges when building the PBVH GPU buffers Reviewed By: brecht Differential Revision: https://developer.blender.org/D6032
2019-10-02Fix T70390: dyntopo smooth shading broken after recent changesBrecht Van Lommel
Made the code fully thread safe now.
2019-10-01Cleanup: compiler warningBrecht Van Lommel
2019-09-30Fix wrong sculpt flat shaded normals after recent optimizationsBrecht Van Lommel
2019-09-29Sculpt: minor optimizations for GPU draw buffer fillingBrecht Van Lommel
Ref T70295
2019-09-29Sculpt: multithread GPU draw buffer filling for workbenchBrecht Van Lommel
This improves performance of some sculpt tools, particularly those that modify many vertices like filter and mask tools, or use brushes with large radius. For mask expand it can make updates up to 2x faster on heavy meshes, but for most tools it's more on the order of 1-1.1x. There are bigger bottlenecks to solve, like normal updates. Ref T70295 Differential Revision: https://developer.blender.org/D5926
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-09-13Cleanup: compiler warningsBrecht Van Lommel
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-08-06Fix T67437: Vertex Colors Not Visible In SculptModeJeroen Bakker
Recently Shader parameter names for UVMaps and vertex colors were renamed. The sculpt drawing code still used the old parameter names. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5320
2019-07-08Fix T66351 Wireframe display in sculpt-mode broke when hiding partsClément Foucault
2019-06-06Fix T58920: Dyntopo sculpt and snake hook brush artifacts.mano-wii
This is a mix of solutions rBe60b18d51d58 and rB52af5fa31fbc. What happened was that when a node of the BVH gets 0 vertices, the batch is untouched and therefore still drawn.
2019-05-04Cleanup: GPU_buffers: Remove obsolete debug drawingClément Foucault
2019-05-04GPUBuffers: Save / expose material index per buffersClément Foucault
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-23GPUBuffers: Fix wrong assertClément Foucault
For good this time... forgot to commit it in the previous commit rBedde48f57844.
2019-04-23Workbench: Support Active Vertex ColorJeroen Bakker
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
2019-04-22Cleanup: style, use braces for gpuCampbell Barton
2019-04-17GPUBuffers: Remove wrong assertClément Foucault
The assert was not true if the pbvh node had no triangle. Also update the comment to reflect that.
2019-04-17ClangFormat: adjust '#if 0' to fix gpu_buffers.c indentCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
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
2019-02-26Cleanup: indentation, trailing spaceCampbell Barton
2019-02-24GPUBuffer: Fix fast navigate in on smoooth multires gridClément Foucault
2019-02-22Multires: Don't force smooth shadingSergey Sharybin
There is still work needed to be done from multires side to fully support smooth shading. So can't just always have smooth shading. Roll back to a proper code in GPU side, the rest will be handled from CCG side.
2019-02-22GPUBuffers: Fix/cleanup multires implementationClément Foucault
The multires sculpt drawing was a not working in smooth mode. Also hidding was not supported by the wireframe overlay and flat shaded faces. Codewise it is cleaner and index buffers are only updated if the smoothing changes.
2019-02-18Sculpt Draw: Add support for wireframe geometryClément Foucault
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.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
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.
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2018-12-14GPUBuffers: Fix uninitialized memory use causing undefined conditional jumpClément Foucault
2018-09-24Spelling fixes in comments and descriptions (2.8 changes), patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3719
2018-09-14GPUBuffers: Rework support for pbvh grids + fast navigateClément Foucault
Flat shaded grids are now rendered as a long triangle strip with degenerate triangles. Smooth shaded grids are not changed. Also add back fast navigate. The only difference with 2.79 is that fast navigate + flat shading will show slitly "incorrect" smooth face. But that's too much effort to fix for what it is.
2018-09-12Cleanup: use uint/uchar types in GPUCampbell Barton
2018-09-11Followup for previous PBVH commitSergey Sharybin
Didn't realize the index buffer is stored once in a BVH and same pointer is reused. Surprisingly, simple files were fixed with the previous fix. Now disabled the optimization all together, and it was simpler to just completely remove all residue of the code. It is likely to be a different implementation anyway, so no need to try to keep code in a semi-broken state.
2018-09-11FIx/workaround wrong number of primitives in PBVG grid buffersSergey Sharybin
Nodes can have different number of grids, so can not so simply re-use index buffer across nodes. For now allow re-using buffer if number of grids matches. The issue is, number of grids is probably almost never matches, so in order to have this optimization working need more tricks. Maybe we can "instance" index buffers?
2018-09-11PBVH: Fix miossing normals for gridsSergey Sharybin
2018-08-24Cleanup: Remove debug printfClément Foucault
2018-08-24Sculpt: Optimize Mask Overlay drawingClément Foucault
* 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
2018-07-18Cleanup: style for GPU moduleCampbell Barton
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
2018-07-08Cleanup: rename 'ct' to 'len' for gpuCampbell Barton
2018-07-08Cleanup: rename 'ct' to 'len' for gawainCampbell Barton
2018-06-26Cleanup: dyntopo sculpt draw update: use same BM_face_as_array_vert_tri for ↵Bastien Montagne
indexbuf generation. It's cleaner, and actually assert that BMFace is a triangle. Same code as when generating vertexbuf for flat shading!
2018-06-26Fix T55320: Sculpt Mode with dyntopo and smooth shading drawing bug.Bastien Montagne
We have to discard the batch in smooth case, because we are modifying the index buffer (flat shading don't need it, only changes vertex buffer on redraw, which is safe). Many thanks to @fclem for his help on debuging/understanding what was wrong here!