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
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.
2021-11-03Merge branch 'blender-v3.0-release'Campbell Barton
2021-11-03Cleanup: spellingCampbell Barton
2021-11-02Fix: Build error on windows.Ray Molenkamp
External symbols in C files need to be marked as such otherwise the linker will not find them.
2021-11-02Removed compilation warning nullptr check in image engine.Jeroen Bakker
2021-11-02Merge branch 'blender-v3.0-release'Jacques Lucke
2021-11-02Images: refactor how failed image load attempts are rememberedJacques Lucke
Previously, `ImageTile->ok` and `ImageUser->ok` were used to indicate whether an image failed to load. There were three possible values which (probably) had the following meanings: * `0`: There was an error while loading the image. Don't try to load again. * `1`: Default value. Try to load the image. * `2`: The image was loaded successfully. This image-wide flag did not make sense unfortunately, because loading may work for some frames of an image sequence but not for others. Remember than an image data block can also contain a movie. The purpose of the `->ok` flag was to serve as an optimization to avoid trying to load a file over and over again when there is an error (e.g. the file does not exist or is invalid). To get the optimization back, the patch is changing `MovieCache` so that it can also cache failed load attempts. As a consequence, `ibuf` is allowed to be `NULL` in a few more places. I added the appropriate null checks. This also solves issues when image sequences are used with the Image Texture node in Geometry nodes (also see D12827). Differential Revision: https://developer.blender.org/D12957
2021-11-02Merge branch 'blender-v3.0-release'Philipp Oeser
2021-11-02Merge branch 'blender-v3.0-release'Campbell Barton
2021-11-02Cleanup: clang-tidyCampbell Barton