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-04-29Select Engine: port shader to use 'GPUShaderCreateInfo'Germano Cavalcante
Simple port with a few cosmetic changes: - Attribute named "color" for indices VBO is now called "index" - The indices VBO is now composed of `int`s instead of `uint`s (this simplifies the source) Differential Revision: https://developer.blender.org/D14800
2022-04-29Cleanup: missing declaration warnings & spelling in commentsCampbell Barton
2022-04-28Cleanup: Overlay: Avoid local variable shadowingClément Foucault
2022-04-28Overlay: Port UDIM Grid shader to shaderCreateInfoClément Foucault
Simple Straight forward port.
2022-04-28Overlay: Port Grid shader to shaderCreateInfo and other code cleanupClément Foucault
Along with the port to createInfo this also: - Packs constant uniforms in a UBO. - Share enum declaration and unify names - Makes codeflow easier to undestand. - Split grid data to its own struct. # Conflicts: # source/blender/draw/engines/overlay/overlay_grid.c
2022-04-28Fix error holding stack memory in a uniformCampbell Barton
Caused by db622b5a0bea32cb3a78c0a4c7d4372a9178d27e
2022-04-28EEVEE: Add shader compilation progress in the viewportClément Foucault
Since rBfa43c47c7cb8446b632a4c0f712162ba615fe51f the progress bar do not show the compilation progress. This was misleading as users could think it could be canceled or prevent rendering. Now we just show how many shaders are still in the compilation queue inside each viewport. This number is more accurate than the percentage that was previously displayed in the progress bar.
2022-04-28GPUMaterial: Rework the deferred compilation to not use double locksClément Foucault
This uses refcounter instead of double thread mutexes. This should be more robust and avoir use after free situation. Also remove redundant structures and the use of scene as the job owner.
2022-04-27Fix T97235: PBVH draw cache invalidation bugJoseph Eagar
The PBVH draw cache wasn't being invalidated in all cases. It is now invalidated whenever a PBVH node's draw buffers are freed.
2022-04-27Fix T96434: bad performance with viewport statistics and GPU subdivisionKévin Dietrich
The subdivision is always recomputed on the CPU when displaying stats if the mesh is animated which leads to bad performance. This caches the subdivision topology counters from the draw code in the mesh runtime and uses them for the viewport statistics. Differential Revision: https://developer.blender.org/D14774
2022-04-27Cleanup: formatKévin Dietrich
2022-04-27Metal: GLSL Compatibility - Hosting default uniform values.Jason Fielder
There are a number of shaders, most notably grid_frag.glsl, which rely on default assignments to uniform values within shaders. This is not currently supported by the shader uniform push model implemented for the Metal backend, wherein uniform updates are pushed as a singular block of data. Any default assignment would become over-written. As such, adding assignments of these default values in the high-level, to ensure the correct value is written for all APIs. This likely impacts Vulkan push-constants as well. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14555
2022-04-27Fix T96283: last disabled subsurf is used for GPU subdivisionKévin Dietrich
When more than one, consecutive, subdivision modifier is used on a Mesh, the last subsurf modifier is used for GPU subdivision even though it might be disabled. This is because retrieving the last subsurf modifier in the draw code did not check whether the modifier was disabled or not. To fix this, the session UUID of the modifier which delegated evaluation to the GPU code is cached and used in the draw to select the right subsurf modifier. Differential Revision: https://developer.blender.org/D14488
2022-04-25Fix: Incorrect implicit enum conversionHans Goudey
Hardcode Catmull Rom curves for now, since nothing else is implemented.
2022-04-25Cleanup: spelling in commentsCampbell Barton
2022-04-24Cleanup: clang-formatCampbell Barton
2022-04-22Cleanup: Clang tidy, unused variable warningsHans Goudey
Also remove unnecessary uses of `struct` and add const in one place.
2022-04-22Cleanup: Remove unused variables, adjust commentsHans Goudey
2022-04-22Fix: Build error on macOS after previous commitHans Goudey
2022-04-22Curves: Further split of curves draw code from particlesHans Goudey
Extends the changes started in f31c3f8114616bb to completely separate much of the DRW curves code from the particle hair drawing. In the short term this increases duplication, but the idea is to simplify development by making it easier to do larger changes to the new code, and the new system will replace the particle hair at some point. After this, only the shaders themselves are shared. Differential Revision: https://developer.blender.org/D14699
2022-04-21Sculpt: fix missing null pointer checkJoseph Eagar
in workbench_engine.c
2022-04-21Commit D14179: Revamp Vertex Paint With C++Joseph Eagar
- Verrtex paint mode has been refactored into C++ templates. It now works with both byte and float colors and point & corner attribute domains. - There is a new API for mixing colors (also based on C++ templates). Unlike the existing APIs byte and float colors are interpolated identically. Interpolation does happen in a squared rgb space, this may be changed in the future. - Vertex paint now uses the sculpt undo system. Reviewed By: Brecht Van Lommel. Differential Revision: https://developer.blender.org/D14179 Ref D14179
2022-04-20Revert "Fix GPU subdivision: Crash on adding subdivision surface modifier"Clément Foucault
The fix does not fix the case of shaders comming from the OpenSubdiv API. This reverts commit f5191b87608f6607aa1dbd4b9409174db351984b.
2022-04-20Cleanup: Rename CD_MLOOPCOL to CD_PROP_BYTE_COLORHans Goudey
The "PROP" in the name reflects its generic status, and removing "LOOP" makes sense because it is no longer associated with just mesh face corners. In general the goal is to remove extra semantic meaning from the custom data types.
2022-04-20Fix GPU subdivision: Crash on adding subdivision surface modifierClément Foucault
This was caused by the use of a reserved keyword macro that is not directly used but causes an error on some compiler. Change the occurences to not match the macros.
2022-04-20Cleanup: spelling in commentsCampbell Barton
2022-04-20Cleanup: clang-formatCampbell Barton
2022-04-19Cleanup: GPUMaterial: Remove GPU_material_is_volume_shaderClément Foucault
2022-04-19DRW: Volume: Fix warning about unused variableClément Foucault
2022-04-19EEVEE: Fix compilation caused by missing fileClément Foucault
2022-04-19GPU: Replace `GPUMaterialVolumeGrid` by `GPUMaterialAttribute`Clément Foucault
This is to make the codegen and shading nodes object type agnostic. This is essential for flexibility of the engine to use the nodetree as it see fits. The essential volume attributes struct properties are moved to the `GPUMaterialAttribute` which see its final input name set on creation. The binding process is centralized into `draw_volume.cc` to avoid duplicating the code between multiple engines. It mimics the hair attributes process. Volume object grid transforms and other per object uniforms are packed into one UBO per object. The grid transform is now based on object which simplify the matrix preparations. This also gets rid of the double transforms and use object info orco factors for volume objects. Tagging @brecht because he did the initial implementation of Volume Grids.
2022-04-19Workbench: Volume: Fix errors about unboud textureClément Foucault
2022-04-19DRW: Centralize smoke domain texture managementClément Foucault
This code was duplicated in multiple engines. Now it is the draw manager responsability to manage the throwaway fluid textures.
2022-04-19Refactor: Move mesh face dot tag out of MVertHans Goudey
Continuing the refactors described in T93602, this commit moves the face dot tag set by the subdivision surface modifier out of `MVert` to `MeshRuntime`. This clarifies its status as runtime data and allows further refactoring of mesh positions in the future. Before, `BKE_modifiers_uses_subsurf_facedots` was used to check whether subsurf face dots should be drawn, but now we can just check if the tags exist on the mesh. Modifiers that create new new geometry or modify topology will already remove the array by clearing mesh runtime data. Differential Revision: https://developer.blender.org/D14680
2022-04-18Cleanup: Remove incorrect commentHans Goudey
2022-04-18Cleanup: Clang tidyHans Goudey
- Inconsistent parameter names - Else after return - Braces around statements - Qualified auto - Also (not clang tidy): Pass StringRef by value, unused parameter
2022-04-15GPU: Make viewport not acquireable during renderingClément Foucault
This is a partial fix to the fact that rendering with EEVEE or other GL render engines is currently blocking the whole UI when asking to redraw a viewport. This patch just bypasses the viewport bind (containing the Draw Context lock) and the following drawing. There is an update tagging to not loose a viewport update if there was one asked. Other queries other than view redraw (such as selection depth drawing or offscreen drawing) will still block the whole UI as they need immediate data feedback. Ping @Severin for the change in `WM_draw_region_viewport_bind()`. I'm assuming this is not an issue because it's highly unlikely to bring up this operator during rendering. But in this case, it would just lock as usual. The bypassing in `DRW_notify_view_update` might be a bit overparanoid.
2022-04-15EEVEE: Support disabling all lightprobe object contribution in viewportClément Foucault
This is supported throught the visibility toggle. The light cache will then only be used for world lighting. This is the behavior as light objects.
2022-04-14GPU: Make nodetree GLSL Codegen render engine agnosticClément Foucault
This commit removes all EEVEE specific code from the `gpu_shader_material*.glsl` files. It defines a clear interface to evaluate the closure nodes leaving more flexibility to the render engine. Some of the long standing workaround are fixed: - bump mapping support is no longer duplicating a lot of node and is instead compiled into a function call. - bump rewiring to Normal socket is no longer needed as we now use a global `g_data.N` for that. Closure sampling with upstread weight eval is now supported if the engine needs it. This also makes all the material GLSL sources use `GPUSource` for better debugging experience. The `GPUFunction` parsing now happens in `GPUSource` creation. The whole `GPUCodegen` now uses the `ShaderCreateInfo` and is object type agnostic. Is has also been rewritten in C++. This patch changes a view behavior for EEVEE: - Mix shader node factor imput is now clamped. - Tangent Vector displacement behavior is now matching cycles. - The chosen BSDF used for SSR might change. - Hair shading may have very small changes on very large hairs when using hair polygon stripes. - ShaderToRGB node will remove any SSR and SSS form a shader. - SSS radius input now is no longer a scaling factor but defines an average radius. The SSS kernel "shape" (radii) are still defined by the socket default values. Appart from the listed changes no other regressions are expected.
2022-04-14Metal: GLSL shader compatibility 4th passJason Fielder
MSL follows C++ standard convention, and such variable declarations within switch statements must have their scope localised within each case. Adding braces in all cases ensures correct behaviour and avoids 'case ... bypass initialization of local variable' compilation error. struct initialisation to follow C++ rules for Metal. Implicit constructors replaced with either explicit constructors or list-initialization where appropriate. Ref T96261 Authored by Apple: Michael Parkin-White Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14451
2022-04-14Metal: GLSL shader compatibility 3rd passJason Fielder
Undefined behaviour for divergent control-flow fixes, replacement for partial vector references, and resolution of a number of calculation precision issues occuring on macOS. Authored by Apple: Michael Parkin-White Ref: T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D14437
2022-04-14Cleanup: unused argument warningCampbell Barton
2022-04-14Cleanup: Further hair to curves renamingHans Goudey
These were missed in previous passes. Also remove some logic in `draw_hair.c` that was redundant after f31c3f8114616bb8964c8e7.
2022-04-14Curves: Split curve EEVEE/workbench functions from particle hairHans Goudey
The GPU evaluation for curves will have to change significantly from the current particle hair drawing code, due to its more general use cases and support for more curve types. To simplify that process and avoid introducing regressions for the rendering of hair particle systems, this commit splits drawing functions for the curves object and particle hair. The changes are just inlining of functions and copying code where necessary. Differential Revision: https://developer.blender.org/D14576
2022-04-14Fix T96563: tangents artifacts with GPU subdivisionKévin Dietrich
When tangent are computed from generated coordinates, the result for GPU subdivision would be compressed to 16-bit when it shouldn't.
2022-04-14Fix part of T96596: wrong generated coordinates with GPU subdivisionKévin Dietrich
Problem is that the orco layer was not taken care of by the GPU subdivision routines. This only handles the issues for EEVEE/Workbench. For Cycles, this would need to be handled at the wrapper level somehow.
2022-04-14Fix T97053: on cage GPU subdivision shows subdivided edges as actualKévin Dietrich
edges When wireframe mode is turned on, the subdivision edges not originating from coarse edges were also drawn as regular edges, which would confuse users trying to select them. These should not be drawn in edit mode, only in object mode when optimal display is turned off (matching the CPU subdivision case).
2022-04-14Cleanup: Make curve deform argument optionalHans Goudey
The "dir" argument to `BKE_where_on_path` was only actually used in a few places. It's easier to see where those are if there isn't always a dummy argument.
2022-04-13Fix some usages of 'GPU_shader_get_uniform_block'Germano Cavalcante
`GPU_shader_get_uniform_block` is marked as deprecated and the value returned does not match what `GPU_uniformbuf_bind` expects. Also, small typo fix in python error message. Differential Revision: https://developer.blender.org/D14638
2022-04-13Cover some DNA files with C++ utility macrosSergey Sharybin
Solves compilation warning with Clang, and moves manipulation with DNA structures to the designed way for C++. The tests and few other places are update to the new code by Jacques. Ref T96847 Maniphest Tasks: T96847 Differential Revision: https://developer.blender.org/D14625