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-09-13Merge branch 'master' into temp-T73411-add-scene-parameterstemp-T73411-add-scene-parametersMonique
2022-09-13EEVEE: Fix volumetric resolve in large scenes.Jeroen Bakker
On NVIDIA volumetric resolve failed for large production scenes. The result would remove most color from the final render. The cause seems to be a faulty driver. This change ported the fragment shader to a compute shader which would select a different compiler branch and didn't show the error.
2022-09-13EEVEE-Next: Cryptomatte render passes.Jeroen Bakker
This change adds cryptomatte render passes to EEVEE-Next. Due to the upcoming viewport compositor we also improved cryptomatte so it will be real-time. This also allows viewing the cryptomatte passes in the viewport directly. {F13482749} A surface shader would store any active cryptomatte layer to a texture. Object hash is stored as R, Asset hash as G and Material hash as B. Hashes are only calculated when the cryptomatte layer is active to reduce any unneeded work. During film accumulation the hashes are separated and stored in a texture array that matches the cryptomatte standard. For the real-time use case sorting is skipped. For final rendering the samples are sorted and normalized. NOTE: Eventually we should also do sample normalization in the viewport in order to extract the correct mask when using the viewport compositor. Reviewed By: fclem Maniphest Tasks: T99390 Differential Revision: https://developer.blender.org/D15753
2022-09-12Sculpt: Fix T100941: Draw cache invalidation loopJoseph Eagar
PBVH draw was invalidating the draw cache even when disabled (e.g. if modifiers exist).
2022-09-10Apply formatting, remove unneeded changes.Monique
2022-09-09Merge branch 'master' into temp-T73411-add-scene-parametersJeroen Bakker
2022-09-09Subdiv: Avoid quadratic runtime for loose edgesHans Goudey
Currently, when subdividing every single vertex on every loose edge, Blender iterates over all other edges to find neighbors. This has quadratic runtime and can be very slow. Instead, first create a map of edges connected to each vertex. With about 10000 edges, the performance goes from very slow to very smooth in my tests. Because of the nature of quadratic runtime, the improvement will depend massively on the number of elements. The only downside to this is that the map will still be built when there are only a couple loose edges, but that case is probably not so common. Differential Revision: https://developer.blender.org/D15923
2022-09-09Cleanup: Remove unused attribute in draw manager.Jeroen Bakker
There are no plans to use the object attribute anymore.
2022-09-09Cleanup: format, trailing spaceCampbell Barton
2022-09-09Cleanup: spelling in commentsCampbell Barton
2022-09-09Cleanup: quiet conversion warningCampbell Barton
2022-09-08WIP: Adding const Scene* to many areas.Jeroen Bakker
2022-09-08Cleanup: make meaning of base visibility flags more clearBrecht Van Lommel
Rename, add comments, and use flag in the depsgraph to ensure the logic matches. Differential Revision: https://developer.blender.org/D15883
2022-09-08Cleanup: Use C++ methods to retrieve attribute accessorsHans Goudey
Replace `mesh_attributes`, `mesh_attributes_for_write` and the point cloud versions with methods on the `Mesh` and `PointCloud` types. This makes them friendlier to use and improves readability. Differential Revision: https://developer.blender.org/D15907
2022-09-08Cleanup: prefer terms verts/polys over vertices/polygonsCampbell Barton
Follows existing naming for the most part, also use "num" as a suffix in some instances (following our naming conventions).
2022-09-07DRW: update test 'draw_pass_all_commands'Germano Cavalcante
It was incorrectly updated in rBc226c480079fc07e3784f673b1bac4a774fe7937
2022-09-07DRW: fix 'bind_texture' being called in place of 'bind_image'Germano Cavalcante
Error pointed out by tests.
2022-09-07CMake: add missing headersCampbell Barton
2022-09-07Cleanup: sort cmake file listsCampbell Barton
2022-09-07Cleanup: Tweak naming for recently added mesh accessorsHans Goudey
Use `verts` instead of `vertices` and `polys` instead of `polygons` in the API added in 05952aa94d33eeb50. This aligns better with existing naming where the shorter names are much more common.
2022-09-06Merge branch 'blender-v3.3-release'Brecht Van Lommel
2022-09-06Fix T100842: Display Texture Paint UVs option in UV editor not workingBrecht Van Lommel
In 8cf52e8226cb we assumed that the UV IBO's are only needed in edit mode, however the UV lines also need to work in texture paint mode. So prefer to use bmesh when available to fix the original bug, but don't assume the face is hidden when there is no bmesh. Differential Revision: https://developer.blender.org/D15895
2022-09-06Update DRW testsGermano Cavalcante
And remove retest of `GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR`.
2022-09-06GPU/DRW: Fix testClément Foucault
Regression introduced in rB755e728a9840
2022-09-06DRW: remove consistent debug buffer bindClément Foucault
This avoids the overhead of debug drawing when not debugging anything or even not using the new draw manager.
2022-09-06Cleanup: spelling in comments, formatting, move comments into headersCampbell Barton
2022-09-05GPU: convert 'GPU_SHADER_2D_IMAGE_COLOR' to 3DGermano Cavalcante
3D shaders work in both 2D and 3D viewports. This shader is a good candidate to be exposed in Python.
2022-09-05GPU: remove 'GPU_SHADER_2D_FLAT_COLOR'Germano Cavalcante
The only real difference between `GPU_SHADER_2D_FLAT_COLOR` and `GPU_SHADER_3D_FLAT_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions. This will simplify porting shaders to python as it will not be necessary to use a 3D and a 2D version of the shaders. In python the new name for '2D_FLAT_COLOR'' and '3D_FLAT_COLOR' is 'FLAT_COLOR', but the old names still work for backward compatibility.
2022-09-05Mesh: Remove redundant custom data pointersHans Goudey
For copy-on-write, we want to share attribute arrays between meshes where possible. Mutable pointers like `Mesh.mvert` make that difficult by making ownership vague. They also make code more complex by adding redundancy. The simplest solution is just removing them and retrieving layers from `CustomData` as needed. Similar changes have already been applied to curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of the pointers generally makes code more obvious and more reusable. Mesh data is now accessed with a C++ API (`Mesh::edges()` or `Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`). The CoW changes this commit makes possible are described in T95845 and T95842, and started in D14139 and D14140. The change also simplifies the ongoing mesh struct-of-array refactors from T95965. **RNA/Python Access Performance** Theoretically, accessing mesh elements with the RNA API may become slower, since the layer needs to be found on every random access. However, overhead is already high enough that this doesn't make a noticible differenc, and performance is actually improved in some cases. Random access can be up to 10% faster, but other situations might be a bit slower. Generally using `foreach_get/set` are the best way to improve performance. See the differential revision for more discussion about Python performance. Cycles has been updated to use raw pointers and the internal Blender mesh types, mostly because there is no sense in having this overhead when it's already compiled with Blender. In my tests this roughly halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million face grid). Differential Revision: https://developer.blender.org/D15488
2022-09-05Cleanup: Fix unused variable warningsHans Goudey
2022-09-05Fix T81002: Images drawn with the Python gpu module no longer draw on top in ↵Germano Cavalcante
the Image Editor This reverts commit 32d4a67017ecf4af75a9bfde885526550a6534ba thus fixing T81002 again. And in order not to break T81212 (again) a different fix was implemented. Reviewed By: brecht Differential Revision: https://developer.blender.org/D15840
2022-09-05Cleanup: make formatBrecht Van Lommel
2022-09-05IDMAnagement: Add owner ID pointer to embedded ones.Bastien Montagne
Add a dedicated `owner_id` pointer to ID types that can be embedded (Collections and NodeTrees), and modify slightly come code to make handling those more safe and consistent. This implements first part of T69169. Reviewed By: brecht Differential Revision: https://developer.blender.org/D15838
2022-09-05EEVEE: Fix attributes node on Alpha Clip/Hashed materialsClément Foucault
This was cause by a missing implementation of some post processing attribute functions. Leading to unresolved reference.
2022-09-05Merge branch 'blender-v3.3-release'Clément Foucault
2022-09-05Fix T100775: Regression: EEVEE world environment is stretched when using ↵Clément Foucault
orthographic view It was using normalized vector instead of `viewCameraVec` which account for orthographic views. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D15861
2022-09-05Fix T100788 Regression: EEVEE wrong normal map on backfacesClément Foucault
This was caused by rB07cf3ce92fa2. It was missing a sign flip.
2022-09-02UI: 3D Text CaretHarley Acheson
Changes to the text caret (cursor) when editing Text objects in the 3D Viewport. See D15797 for more details and examples. Differential Revision: https://developer.blender.org/D15797 Reviewed by Brecht Van Lommel
2022-09-02Cleanup: DRW: Fix warning in release modeClément Foucault
2022-09-02EEVEE: Fix Symbol error in SH_L2 CaculationRaphaelBelmont
The caculation of 7th SH coefficient need a negative sign Reviewed By: fclem Differential Revision: https://developer.blender.org/D15635
2022-09-02EEVEE-Next: Port to new Draw ManagerClément Foucault
2022-09-02DRW-Next: Add uniform attributes (object attributes) supportClément Foucault
This replaces the direct shader uniform layout declaration by a linear search through a global buffer. Each instance has an attribute offset inside the global buffer and an attribute count. This removes any padding and tighly pack all uniform attributes inside a single buffer. This would also remove the limit of 8 attribute but it is kept because of compatibility with the old system that is still used by the old draw manager.
2022-09-02Cleanup: EEVEE-Next: Use reference as suggested by MSVCClément Foucault
2022-09-02Cleanup: GPU: UniformAttribute: Improve const correctnessClément Foucault
Removes a warning and tidy the API.
2022-09-02DRWManager: New implementation.Clément Foucault
This is a new implementation of the draw manager using modern rendering practices and GPU driven culling. This only ports features that are not considered deprecated or to be removed. The old DRW API is kept working along side this new one, and does not interfeer with it. However this needed some more hacking inside the draw_view_lib.glsl. At least the create info are well separated. The reviewer might start by looking at `draw_pass_test.cc` to see the API in usage. Important files are `draw_pass.hh`, `draw_command.hh`, `draw_command_shared.hh`. In a nutshell (for a developper used to old DRW API): - `DRWShadingGroups` are replaced by `Pass<T>::Sub`. - Contrary to DRWShadingGroups, all commands recorded inside a pass or sub-pass (even binds / push_constant / uniforms) will be executed in order. - All memory is managed per object (except for Sub-Pass which are managed by their parent pass) and not from draw manager pools. So passes "can" potentially be recorded once and submitted multiple time (but this is not really encouraged for now). The only implicit link is between resource lifetime and `ResourceHandles` - Sub passes can be any level deep. - IMPORTANT: All state propagate from sub pass to subpass. There is no state stack concept anymore. Ensure the correct render state is set before drawing anything using `Pass::state_set()`. - The drawcalls now needs a `ResourceHandle` instead of an `Object *`. This is to remove any implicit dependency between `Pass` and `Manager`. This was a huge problem in old implementation since the manager did not know what to pull from the object. Now it is explicitly requested by the engine. - The pases need to be submitted to a `draw::Manager` instance which can be retrieved using `DRW_manager_get()` (for now). Internally: - All object data are stored in contiguous storage buffers. Removing a lot of complexity in the pass submission. - Draw calls are sorted and visibility tested on GPU. Making more modern culling and better instancing usage possible in the future. - Unit Tests have been added for regression testing and avoid most API breakage. - `draw::View` now contains culling data for all objects in the scene allowing caching for multiple views. - Bounding box and sphere final setup is moved to GPU. - Some global resources locations have been hardcoded to reduce complexity. What is missing: - ~~Workaround for lack of gl_BaseInstanceARB.~~ Done - ~~Object Uniform Attributes.~~ Done (Not in this patch) - Workaround for hardware supporting a maximum of 8 SSBO. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D15817
2022-09-02Merge branch 'blender-v3.3-release'Clément Foucault
# Conflicts: # release/scripts/addons
2022-09-02Fix T100377: EEVEE: Regression 3.2 normalmap node brokenClément Foucault
This was caused by un-wanted normalization. This is a requirement of the MikkTspace. The issue is that g_data.N is expected to be normalized by many other functions and overriden by bump displacement. Adding a new global variable containing the interpolated normal fixes the issue AND make it match cycles behavior better (mix between bump and interpolated normal).
2022-09-02Realtime Compositor: Implement dilate erode nodeOmar Emara
This patch implements the dilate/erode node for the realtime compositor. Differential Revision: https://developer.blender.org/D15790 Reviewed By: Clement Foucault
2022-09-02EEVEE-Next: Move weight layer indexes to shader shared.Jeroen Bakker
Upcoming cryptomatte patch would need access to these defines. So moving them from film_lib to shader shared. We cannot include the film_lib as it requires images/textures to be bound that we don't need. At the same time fixes incorrect casing (`lAYER` => `LAYER`).
2022-09-01Metal: Minimum per-vertex stride, 3D texture size + Transform feedback ↵Jason Fielder
GPUCapabilities expansion. - Adding in compatibility paths to support minimum per-vertex strides for vertex formats. OpenGL supports a minimum stride of 1 byte, in Metal, this minimum stride is 4 bytes. Meaing a vertex format must be atleast 4-bytes in size. - Replacing transform feedback compile-time check to conditional look-up, given TF is supported on macOS with Metal. - 3D texture size safety check added as a general capability, rather than being in the gl backend only. Also required for Metal. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14510