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
2022-08-16Merge branch 'blender-v3.3-release'Brecht Van Lommel
2022-08-16Fix T98773: GPU subdivision issues with UV editor displayBrecht Van Lommel
This fixes missing selection updates in UV editor, both with GPU subdivision and with the Modified Edges display option for modifiers in general. It also fixes the UV editor incorrectly showing the cage mesh with deformed coordinates. These are not yet supported by the UV selection system. Changes: * Always read selection state from the editmesh when building batches. The flags in the evaluated mesh can be outdated as selection bypasses depsgraph evaluation for performance, and instead may just clear the batches. * runtime.is_original is only valid for the bmesh wrapper. The check for building the UV cage should only use that if the mesh is a bmesh wrapper. * Don't create cage batches for objects whose mesh is in edit mode, but that are not themselves in edit mode, there is no need. Differential Revision: https://developer.blender.org/D15658
2022-08-16Cleanup: formatCampbell Barton
2022-08-16Sculpt: Improve sculpt debug drawJoseph Eagar
* Fixed crash in debug draw code. Apparently this is only used by PBVH draw? * Debug draw code can now be forcibly enabled in release mode (i.e. RelWithDebugInfo) by uncommenting a commented out #define. * Fixed colors in debug draw mode. * PBVH node boxes in debug mode now flash a different color when they are updated.
2022-08-15EEVEE-Next: HiZ Buffer: New implementationClément Foucault
This new implementation does all downsampling in a single compute shader dispatch, removing a lot of complexity from the previous recursive downsampling. This is heavilly inspired by the Single-Pass-Downsampler from GPUOpen: https://github.com/GPUOpen-Effects/FidelityFX-SPD However I do not implement all the optimization bits as they require vulkan (GL_KHR_shader_subgroup) and is not as versatile (it is only for HiZ). Timers inside renderdoc report ~0.4ms of saving on a 2048*1024 render for the whole downsampling. Note that the previous implementation only processed 6 mips where the new one processes 8 mips. ``` EEVEE ~1.0ms EEVEE-Next ~0.6ms ``` Padding has been bumped to be of 128px for processing 8 mips. A new debug option has been added (debug value 2) to validate the HiZ.
2022-08-15Cleanup: fix typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D15680
2022-08-14DRW: Add intersection and shape libraries for GLSLClément Foucault
These are meant to provide easy shape and AABB operation for culling. They are currently incomplete but can be extended as one see fits. The `common_debug_shape_lib.glsl` contains helper to draw thoses shapes.
2022-08-14DRW: Debug: Fix `print` templateClément Foucault
It was impossible to print literals like `drw_print(5)`.
2022-08-14DRW: Debug: Fix drw_debug_sphere not positioning and scaling the sphereClément Foucault
It was an oversight.
2022-08-12Cleanup: replace term face with polyCampbell Barton
Be consistent with naming to avoid mixing MPoly/MFace.
2022-08-11Mesh: Move hide flags to generic attributesHans Goudey
This commit moves the hide status of mesh vertices, edges, and faces from the `ME_FLAG` to optional generic boolean attributes. Storing this data as generic attributes can significantly simplify and improve code, as described in T95965. The attributes are called `.hide_vert`, `.hide_edge`, and `.hide_poly`, using the attribute name semantics discussed in T97452. The `.` prefix means they are "UI attributes", so they still contain original data edited by users, but they aren't meant to be accessed procedurally by the user in arbitrary situations. They are also be hidden in the spreadsheet and the attribute list by default, Until 4.0, the attributes are still written to and read from the mesh in the old way, so neither forward nor backward compatibility are affected. This means memory requirements will be increased by one byte per element when the hide status is used. When the flags are removed completely, requirements will decrease when hiding is unused. Further notes: * Some code can be further simplified to skip some processing when the hide attributes don't exist. * The data is still stored in flags for `BMesh`, necessitating some complexity in the conversion to and from `Mesh`. * Access to the "hide" property of mesh elements in RNA is slower. The separate boolean arrays should be used where possible. Ref T95965 Differential Revision: https://developer.blender.org/D14685
2022-08-11Cleanup: spelling in commentsCampbell Barton
2022-08-11License headers: add missing license headerCampbell Barton
2022-08-10Realtime Compositor: Allow in material preview modeOmar Emara
This patch allows the viewport compositor to operate in Material Preview mode. Differential Revision: https://developer.blender.org/D15655 Reviewed By: Clement Foucault
2022-08-10Realtime Compositor: Add evaluator and engineOmar Emara
This patch adds the core realtime compositor evaluator as well as a compositor draw engine powered by the evaluator that operates in the viewport. The realtime compositor is a new GPU accelerated compositor that will be used to power the viewport compositor imminently as well as the existing compositor in the future. This patch only adds the evaluator and engine as an experimental feature, the implementation of the nodes themselves will be committed separately. See T99210. Differential Revision: https://developer.blender.org/D15206 Reviewed By: Clement Foucault
2022-08-10Cleanup: spellingCampbell Barton
2022-08-10Cleanup: formatCampbell Barton
2022-08-10DRW: DebugDraw: Fix unguarded drw_debug_draw()Clément Foucault
This might create nullptr dereference in some cases.
2022-08-09Cleanup: MIscellaneous improvements to pointcloud draw cacheHans Goudey
- Use references - Reorder functions to remove unnecessary prototype - Use the attribute API - Use const where possible - Split no-radius extraction a bit more, add multithreading
2022-08-09Cleanup: Remove file mistakenly kept in C++ conversionHans Goudey
2022-08-09Cleanup: Move draw_cache_impl_pointcloud.c to C++Hans Goudey
2022-08-09DRW: DebugDraw: Port module to C++ and add GPU capabilitiesClément Foucault
This is a complete rewrite of the draw debug drawing module in C++. It uses `GPUStorageBuf` to store the data to be drawn and use indirect drawing. This makes it easier to do a mirror API for GPU shaders. The C++ API class is exposed through `draw_debug.hh` and should be used when possible in new code. However, the debug drawing will not work for platform not yet supporting `GPUStorageBuf`. Also keep in mind that this module must only be used in debug build for performance and compatibility reasons.
2022-08-09Cleanup: use own username in code-comment tagsCampbell Barton
2022-08-05DRW: GPU Wrapper: add possibility to swap Texture and TextureFromPoolClément Foucault
Ownership is transfered from the pool to the `Texture` and vice versa. This allows to have history buffers with only 1 persistent texture.
2022-08-05Cleanup: DRW: Remove void function argumentClément Foucault
2022-08-05Cleanup: Remove outdated commentHans Goudey
2022-08-05Cleanup: Reduce indentationHans Goudey
2022-08-04Cleanup: Move RNA path functions into own C++ fileJulian Eisel
NOTE: This is committed to the 3.3 branch as part of D15606, which we decided should go to this release still (by Bastien, Dalai and me). That is because these are important usability fixes/improvements to have for the LTS release. Adds `rna_path.cc` and `RNA_path.h`. `rna_access.c` is a quite big file, which makes it rather hard and inconvenient to navigate. RNA path functions form a nicely coherent unit that can stand well on it's own, so it makes sense to split them off to mitigate the problem. Moreover, I was looking into refactoring the quite convoluted/overloaded `rna_path_parse()`, and found that some C++ features may help greatly with that. So having that code compile in C++ would be helpful to attempt that. Differential Revision: https://developer.blender.org/D15540 Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
2022-08-04Cleanup: spelling, code-blocksCampbell Barton
2022-08-02DRW: common_math_lib.glsl: Fix weighted_sum macroClément Foucault
This avoids issue when the macro is followed by another operator. Example: `float result = weighted_sum(a,b,c,d,w) * 5.0;`
2022-08-02DRW: Add image unbind in debug modeClément Foucault
This allows finding missing binds more easily as the missing binds slots won't be populated with previous texture binds.
2022-08-02DRW: Add `DRW_shgroup_call_procedural_indirect()`Clément Foucault
Replaces `DRW_shgroup_call_procedural_triangles_indirect`. This makes the indirect drawing more flexible. Not all primitive types are supported but it is just a matter of adding them.
2022-08-02DRW: Add DRW_shgroup_call_procedural_triangles_indirectClément Foucault
Just like the name suggest, this adds a way to draw a series of proceduraly positioned triangles using and indirect buffer.
2022-08-02DRW: GPU Wrapper: Fix invalid cached texture view when ensure() reallocsClément Foucault
2022-08-02DRW: GPU wrapper: Make SwapChain renference workClément Foucault
This make using texture reference easier. But now, it makes it mandatory for the wrapped type to implement the `swap()` static method.
2022-08-02DRW: GPU wrappers: Expose more ease of use functions and cleanup styleClément Foucault
2022-08-02Merge branch 'blender-v3.3-release'Jeroen Bakker
2022-08-02Fix T99715: Only force optimal display during on cage editing.Jeroen Bakker
This loosens the current implementation a bit to only force optimal display when editing on cage. It used to be any editing mode. Brings GPU based subdivision closer to the CPU version.
2022-07-29Cleanup: Move RNA path functions into own C++ fileJulian Eisel
Adds `rna_path.cc` and `RNA_path.h`. `rna_access.c` is a quite big file, which makes it rather hard and inconvenient to navigate. RNA path functions form a nicely coherent unit that can stand well on it's own, so it makes sense to split them off to mitigate the problem. Moreover, I was looking into refactoring the quite convoluted/overloaded `rna_path_parse()`, and found that some C++ features may help greatly with that. So having that code compile in C++ would be helpful to attempt that. Differential Revision: https://developer.blender.org/D15540 Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
2022-07-28Merge branch 'blender-v3.3-release'Brecht Van Lommel
2022-07-28Revert "Fix T98773: GPU Subdivision breaks auto selection in UV edit mode"Brecht Van Lommel
This reverts commit e2c02655c78b2c669468ae568ddf4b17953cc98d. It was already reverted in the 3.2 branch, as it caused more serious issues than it solved. Fixes T99805, T99323, T99296.
2022-07-28EEVEE-Next: Motion Blur new implementationClément Foucault
The new implementation leverage compute shaders to reduce the number of passes and complexity. The max blur amount is now detected automatically, replacing the property in the render panel by a simple checkbox. The dilation algorithm has also been rewritten from scratch into a 1 pass algorithm that does the dilation more efficiently and more precisely. Some differences with the old implementation can be observed in areas with complex motion.
2022-07-28DRW: TextureFromPool: Change API to use acquire / releaseClément Foucault
This removes the quirk of having to call the sync function for each new render loop. # Conflicts: # source/blender/draw/engines/eevee_next/eevee_view.cc
2022-07-26Refactor: Extract color attributes as generic attributesHans Goudey
Previously there was a special extraction process for "vertex colors" that copied the color data to the GPU with a special format. Instead, this patch replaces this with use of the generic attribute extraction. This reduces the number of code paths, allowing easier optimization in the future. To make it possible to use the generic extraction system for attributes but also assign aliases for use by shaders, some changes are necessary. First, the GPU material attribute can now store whether it actually refers to the default color attribute, rather than a specific name. This replaces the hack to use `CD_MCOL` in the color attribute shader node. Second, the extraction code checks the names against the default and active names and assigns aliases if the request corresponds to a special active attribute. Finally, support for byte color attributes was added to the generic attribute extraction. Differential Revision: https://developer.blender.org/D15205
2022-07-26Cleanup: spelling in commentsCampbell Barton
2022-07-21DRW: Volume: Fix crash in command line render caused by null texturesClément Foucault
This was caused by the world volume shader needing placeholder textures that were not available until cache populate begins. Adding a check and creating on the fly fixes the issue.
2022-07-21Cleanup: DRW: common_math_geom_lib.glsl: Fix variable name styleClément Foucault
2022-07-21DRW: common_math_geom_lib.glsl: Add line_aabb_clipping_distClément Foucault
2022-07-21Cleanup: formatCampbell Barton
2022-07-20Cleanup: Remove unused functionHans Goudey