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-01-06Cleanup: Clang-tidy: modernize-redundant-void-argAaron Carlisle
2021-12-27Cleanup: Store cursor location in tGPspoint as an arrayAaron Carlisle
Fixes many instances of `-Wstringop-overread` warning on GCC 11 Differential Revision: https://developer.blender.org/D13672
2021-12-27Cleanup: clang tidyJacques Lucke
Use c++ headers; use nullptr; redundant `void` in parameter list; inconsistent parameter name.
2021-12-27Render: move editor/render module to c++Jacques Lucke
Doing this in preparation for some work on asset preview generation. Differential Revision: https://developer.blender.org/D13676
2021-12-27OpenSubDiv: add support for an OpenGL evaluatorKévin Dietrich
This evaluator is used in order to evaluate subdivision at render time, allowing for faster renders of meshes with a subdivision surface modifier placed at the last position in the modifier list. When evaluating the subsurf modifier, we detect whether we can delegate evaluation to the draw code. If so, the subdivision is first evaluated on the GPU using our own custom evaluator (only the coarse data needs to be initially sent to the GPU), then, buffers for the final `MeshBufferCache` are filled on the GPU using a set of compute shaders. However, some buffers are still filled on the CPU side, if doing so on the GPU is impractical (e.g. the line adjacency buffer used for x-ray, whose logic is hardly GPU compatible). This is done at the mesh buffer extraction level so that the result can be readily used in the various OpenGL engines, without having to write custom geometry or tesselation shaders. We use our own subdivision evaluation shaders, instead of OpenSubDiv's vanilla one, in order to control the data layout, and interpolation. For example, we store vertex colors as compressed 16-bit integers, while OpenSubDiv's default evaluator only work for float types. In order to still access the modified geometry on the CPU side, for use in modifiers or transform operators, a dedicated wrapper type is added `MESH_WRAPPER_TYPE_SUBD`. Subdivision will be lazily evaluated via `BKE_object_get_evaluated_mesh` which will create such a wrapper if possible. If the final subdivision surface is not needed on the CPU side, `BKE_object_get_evaluated_mesh_no_subsurf` should be used. Enabling or disabling GPU subdivision can be done through the user preferences (under Viewport -> Subdivision). See patch description for benchmarks. Reviewed By: campbellbarton, jbakker, fclem, brecht, #eevee_viewport Differential Revision: https://developer.blender.org/D12406
2021-12-25Fix T94362: GPUMaterialTexture references freed ImageUserJacques Lucke
The issue was caused by rB7e712b2d6a0d257d272ed35622b41d06274af8df and the fact that `GPUMaterialTexture` contains an `ImageUser *` which references the `ImageUser` on e.g. `NodeTexImage`. Since the node tree update refactor, it is possible that the node tree changes without changing the actual material. Therefore, either the renderer should check if the node tree has changed or it should not store pointers to data in node storage. The latter approach is implemented in this patch. Differential Revision: https://developer.blender.org/D13663
2021-12-23Cleanup: Move hair object type files to C++Hans Goudey
Differential Revision: https://developer.blender.org/D13657
2021-12-20Fix T94262: Grease Pencil Blur Effect DoF mode wrongPhilipp Oeser
This was visible outside of camera view and was not respecting the "Depth of Field" checkbox on the Camera properties. Now return early if DoF should not be visible. Maniphest Tasks: T94262 Differential Revision: https://developer.blender.org/D13631
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-08Cleanup: move public doc-strings into headers for 'draw'Campbell Barton
Ref T92709
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-12-07Fix crash when switching back from render preview.Jeroen Bakker
Issue is that external engine uses the gpu info. but overwrote the instance data. The draw manager would then detect instance data and required the engine type to have a instance free callback. The solution is to save some space in the engine data to hold an empty and unused instance_data attribute to comply with `ViewportEngineData` struct.
2021-12-07DrawManager: Engine Instance Data.Jeroen Bakker
In the original design draw engines had to copy with a limitation that they were not allowed to reuse complex data structures between drawing calls. Data that could be reused were limited to: - GPUFramebuffers - GPUTextures - Memory that could be removed calling MEM_freeN (storage list) - DRWPass This is fine when the storage list contains arrays or structs but when more complex data types (vectors, maps) etc wasn't possible. This patch adds instance_data that can be reused between drawing calls. The instance_data is controlled by the draw engine and doesn't need to be limited as described above. When an engines stores instance_data it must implement the `DrawEngineType.instance_free` callback to free the data. The patch originates from eevee rewrite. But was added to master as the image engine rewrite also has a need for it. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13425
2021-12-07Cleanup: Fix various source typosluzpaz
This is a continuation of D13462 to clean up source typos. Differential Revision: https://developer.blender.org/D13471
2021-12-02Fix T84710: Instances with only mesh edges or vertices are invisibleHans Goudey
Wire-only meshes have a special case in the overlay drawing to give the wire shader a special color (which avoids the lines being dashed, somehow). The fast path for duplis didn't have that special case. Differential Revision: https://developer.blender.org/D13196
2021-12-02Merge branch 'blender-v3.0-release'Hans Goudey
2021-12-02Fix T93525: Crash with curve/text armature bone gizmoHans Goudey
The problem is that drw_batch_cache_generate_requested_delayed is called on the object, which uses the original object data type to choose which data type to get info for. So for curves and text it uses the incorrect type (not the evaluated mesh like we hardcoded in the armature overlay code). To fix this I hardcoded the "delayed" generation to only use the evaluated mesh. Luckily it wasn't use elsewhere besides this armature overlay system. That seems like the simplest fix for 3.0. A proper solution should rewrite this whole area anyway. Differential Revision: https://developer.blender.org/D13439
2021-11-30Cleanup: clang-format, trailing spaceCampbell Barton
2021-11-30Cleanup: capitalize NOTE tagCampbell Barton
2021-11-28Cleanup: typos in comments.Kévin Dietrich
2021-11-24Merge branch 'blender-v3.0-release'Hans Goudey
2021-11-24Fix T92120 (partially): No bone custom shape with curve object meshesHans Goudey
This part of the drawing code assumes that the bone custom object has only one evaluated geometry component, and it also uses the object type to check which data to draw, with the functions like `DRW_cache_object_surface_get` that just take an object input. Those functions usually work on evaluated objects, which use the instancing system to access a temporary object with `object.data` replaced for data types that don't match the original object. That assumption used to work, but now curve, point cloud, or volume objects can have an evaluated mesh which is not accessed with the same object for render engine drawing. The "correct" solution for the way this code is structured would be to loop through all of the geometry components and try to get GPU batches from every one of them. However, that significantly increases complexity in an area that should probably be refactored anyway. This patch treats the mesh as a special case, and only draws the evaluated mesh. The **best** solution in my opinion might be refactoring this area to use the instancing system with some sort of viewport-only flag so the custom shape instances aren't added in the render. The solution is "partial" because the "Wireframe" option only works for meshes from mesh objects, even after this fix, and because other data besides meshes is not displayed at all. Differential Revision: https://developer.blender.org/D13038
2021-11-24Cleanup: Renamed DefaultDrawingMode ImageSpaceDrawingMode.Jeroen Bakker
Explains more what it does, not how it is used.
2021-11-24ImageEngine: Remove unneeded check for tiled image.Jeroen Bakker
Regular images are also tiled images, but with a default tile that leads to the same result.
2021-11-24Cleanup: use lowercase in private functions.Jeroen Bakker
2021-11-24Cleanup: use lowercase in private functions.Jeroen Bakker
2021-11-24Cleanup: Silent compilation warning in draw_manager.Jeroen Bakker
2021-11-23Merge branch 'blender-v3.0-release'Jacques Lucke
2021-11-23Fix T93297: incorrect eevee motion blur with geometry instancesJacques Lucke
This disables motion blur for geometry instances in eevee, which did not work correctly anyway. See code comment for more details. Differential Revision: https://developer.blender.org/D13334
2021-11-23Cleanup: Silence compilation warning.Jeroen Bakker
For now made DRW_notify_view_update_offscreen static.
2021-11-23Merge branch 'blender-v3.0-release'Clément Foucault
2021-11-23Fix T89204: slow repeated rendering with GPUOffscreen.draw_view3d.Christian Stolze
Reviewed By: fclem Differential Revision: D13235
2021-11-19Merge branch 'blender-v3.0-release'Clément Foucault
2021-11-19Fix T91838 Crash when toggling edit mode on object with geometry node ↵Clément Foucault
modifier, but only if the instanced objects material has a normal map assigned. This is only a workaround to avoid the crash. The underlying issue is left unfixed. New report for tracking the underlying issue is T93223.
2021-11-19Merge branch 'blender-v3.0-release'Hans Goudey
2021-11-19Fix T92682: EEVEE motion blur crash with curve objectsHans Goudey
After rBb9febb54a492, the evaluated mesh from a curve is now presented to render engines as a separate mesh object, but some code still assumed that a curve object itself could have an evaluated mesh. However, this is still true for surface objects and metaballs, which don't use geometry sets yet. Differential Revision: https://developer.blender.org/D13272
2021-11-19Cleanup: fix typos in comments and docsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13264
2021-11-18Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-18Fix T92442: undo removal of Eevee cryptomatte accurate mode optionBrecht Van Lommel
The Cycles accurate mode was removed, but the Eevee option for this has a different meaning and should not have been removed. The Eevee accurate makes cryptomatte accumulate for every sample, which Cycles has always done regardless of any option.
2021-11-15Merge branch 'blender-v3.0-release'Kévin Dietrich
2021-11-15Fix T92750: sculpt vertex colors missing in object modeKévin Dietrich
The layers were not aliased properly for usage in the shaders. Regression caused by rB03013d19d167.
2021-11-09Merge branch 'blender-v3.0-release'Hans Goudey
2021-11-09Fix: Crash with no active object after recent commitHans Goudey
rBaa13c4b386b13111 added a check for the active object in drawing code, but it missed adding a check for the active base before trying to retrieve its object.
2021-11-09Merge branch 'blender-v3.0-release'Hans Goudey
2021-11-09Viewport: Remove different outline color for instancesHans Goudey
With instancing becoming more common with geometry nodes, instances are less of a separate thing and more of an essential part of evaluated data. Displaying them with a separate outline, while helpful in some cases, is not worth the lack of visibility or confusion about selected/active status. Information about the performance of the scene due to instancing is always available with the statistics like vertex count, etc. The problems were compounded by the fact that the instancing system is used to output geometry components that don't correspond to the object's original type. So this patch also fixes that problem. Fixes T92079, T81010 Ref T91310 Differential Revision: https://developer.blender.org/D13133
2021-11-09Cleanup: clang-formatCampbell Barton
2021-11-08Basic engine shaders testJarrett Johnson
This patch adds shader compilation tests for the basic engine in `shaders_test.cc` Addresses T92701 Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13066
2021-11-08Fix ASAN issue in image editor.Jeroen Bakker
Adding virtual constructors to base classes.
2021-11-05Cleanup: Remove redundant scope qualifiers.Jeroen Bakker
2021-11-05Cleanup: Split image engine into ImageEngine, SpaceAccessor and DrawingMode.Jeroen Bakker
Image engine is used to draw an image into a space. The current structure wasn't clear and couldn't be easilly extended. This refactor spliced the image draw engine into 3 main components. - Space accessors: contains an interface to communicate with space data (Image editor, UV Editor, Node Editor) in a common way. This reduced the branching in the code base. - DrawingMode: contains an interface to the used tactic to draw an image inside the space framebuffer. Currently only one mode is implemented; in the future there could be a separate drawing mode for huge images. - ImageEngine: the core that connects the draw manager with the space data and drawing mode.