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-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: UI: Make Vector pass greyed out when motion blur is enabledClément Foucault
Also clears the render result to 0 to avoid invalid motion vectors.
2022-07-28EEVEE-Next: Cleanup: Isolate render result readback and prototype progressClément Foucault
Still not working but the idea is to read the result and display the first image sample so that user has a better feedback of the rendering.
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-28EEVEE-Next: Fix Vector render passClément Foucault
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-25EEVEE-Next: Fix float3 passes being incorrectClément Foucault
2022-07-25EEVEE-Next: Fix some Material compilation errorsClément Foucault
2022-07-24EEVEE-Next: Decorelate Large filter spiral samplingClément Foucault
This avoids correlation artifacts with the jitter pattern itself. Also try to reduce the visible spiral pattern.
2022-07-24EEVEE-Next: Fix depth accumulation and stability in viewportClément Foucault
The display depth is used to composite Gpencil and Overlays. For it to be stable we bias it using the dFdx gradient functions. This makes overlays like edit mode not flicker. The previous approach to save the 1st center sample does not work anymore since we jitter the projection matrix in a looping pattern when scene is updated. So the center depth is only (almost) valid 1/8th of the times. The biasing technique, even if not perfect, does the job of being stable. This has a few cons: - it makes the geometry below the ground plane unlike workbench engine. - it makes overlays render over geometry at larger depth discontinuities.
2022-07-24EEVEE-Next: Make animated viewport non jittered when disabling denoisingClément Foucault
2022-07-24EEVEE-Next: Add back background opacity toggleClément Foucault
2022-07-24EEVEE-Next: Make Anti-Flicker more strongClément Foucault
This might make the image a bit blurier but it reduces the flickering of shiny surfaces during animation. This uses the technique described in "High Quality Temporal Supersampling" by Brian Karis at Siggraph 2014 (Slide 45): Reduce the exponential factor when the history is close the bounding box border.
2022-07-24EEVEE-Next: Fix Alt+B render bordersClément Foucault
A few offsets were missing. Reminder that this does not change the actual render resolution but it reduces the VRAM consumption of accumulation buffers.
2022-07-24EEVEE-Next: Fix background velocityClément Foucault
2022-07-23EEVEE-Next: Film: Rename filter_size for clarity and add box filter ...Clément Foucault
... as a debug option.
2022-07-23EEVEE-Next: Film: Fix incorrect anti-aliasingClément Foucault
There was a confusion about what space the offset was in.
2022-07-22EEVEE-Next: Add exposure awareness to denoisingClément Foucault
This uses the exposure to get a better approximation of the perceptual brighness of a sample before accumulating it. Note that we do not modify exposure of the image. Only the samples weights are computed differently.
2022-07-22EEVEE-Next: Fix render not workingClément Foucault
The swaps during accumulation were ignored because of the way the `SwapChain<>` implementation works. Using external references and updating them fixes the issue.
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-21EEVEE-Next: Add back option to disable TAA (Viewport DenoisingClément Foucault
2022-07-21EEVEE-Next: Filter NaN at output to avoid propagation.Clément Foucault
2022-07-21Cleanup: DRW: common_math_geom_lib.glsl: Fix variable name styleClément Foucault
2022-07-21EEVEE-Next: Add Temporal-AntiAliasingClément Foucault
The improvements over the old implementation are: - Improved history reprojection filter (catmull-rom) - Use proper velocity for history reprojection. - History clipping is now done in YCoCg color space using better algorithm. - Velocity is dilated to keep correct edge anti-aliasing on moving objects. As a result, the 3x3 blocks that made the image smoother in the previous implementation are no longer visible is replaced by correct antialiasing. This removes the velocity resolve pass in order to reduce the bandwidth usage. The velocities are just resolved as they are loadded in the film pass.
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
2022-07-20Constraints: add checks to specially handle the custom space target.Alexander Gavrilov
- The custom space target never needs B-Bone data (used by depsgraph). - When drawing the relationship lines use the space matrix directly. - Don't use the custom target to control the target space type dropdown. Differential Revision: https://developer.blender.org/D9732
2022-07-20Constraints: add missing calls to initialize custom space.Alexander Gavrilov
Add calls to a few locations that look like they may need to initialize the Custom Space matrix, i.e. generally any place that computes target matrices. Differential Revision: https://developer.blender.org/D9732
2022-07-20Point Cloud: Remove redundant custom data pointersHans Goudey
Similar to e9f82d3dc7eebadcc52, but for point clouds instead. Differential Revision: https://developer.blender.org/D15487
2022-07-18Subdiv: remove unused GPU device choice, fix crash with libepoxy on initBrecht Van Lommel
openSubdiv_init() would detect available evaluators before any OpenGL context exists, causing a crash with libepoxy. This test however is redundant as we already check the requirements on the Blender side through the GPU API. To simplify things, completely remove the device detection in the opensubdiv module and reduce the evaluators to just CPU and GPU. The plan here is to move to the GPU module abstraction over OpenGL/Metal/Vulkan and so all these different backends no longer make sense. This also removes the user preference for OpenSubdiv compute device, which was not used for the new GPU subdivision implementation. Ref D15291 Differential Revision: https://developer.blender.org/D15470
2022-07-15Fix: Move DRW_shgroup_add_material_resources(grp, mat) to after the ↵Martijn Versteegh
null-check for grp. Reviewed By: fclem Maniphest Tasks: T99646 Differential Revision: https://developer.blender.org/D15436
2022-07-15Fix T99606: Regression: TexCoordinate losing precision far away from originClément Foucault
Same root cause as T99128. The fix also needed to be done in another place.
2022-07-14Fix curve drawing crash after changing geometry nodes output.Lukas Tönne
Using geometry nodes with attributes on a curve object and changing the output is crashing. This is because the `render_mutex` in the curve drawing cache is cleared after changes in `curves_batch_cache_init` and set to null. The cache isn't actually needed currently because all draw updates are single-threaded, but the new `drw_attributes_merge` function still tries to access it (this seems to be tolerated on Linux platforms but crashes on Windows). Make sure the render_mutex is always initialized after (re-)initializing the cache.
2022-07-12Fix T99103: crash when displaying or rendering Grease Pencil objectKhoi Dau
On some hardware/systems, blender may crash when adding, rendering or displaying Grease Pencil objects. In `/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl`, line 35: ``` gpMaterialFlag gp_flag = floatBitsToInt(gp_mat._flag); ``` `gpMaterialFlag` is of type `uint`. This is a mismatched-type assignment that can cause crashes on some hardware/systems with GLSL that do not support implicit type casting. So use `floatBitsToUint` for type conversion. Differential Revision: https://developer.blender.org/D15433
2022-07-11Cleanup: spelling in commentsCampbell Barton
2022-07-09Weight & Vertex Paint: always respect edit mode hiding on faces.Alexander Gavrilov
In some cases it is mandatory to be able to hide parts of the mesh in order to paint certain areas. The Mask modifier doesn't work in weight paint, and edit mode hiding requires using selection, which is not always convenient. This makes the weight and vertex paint modes always respect edit mode hiding like sculpt mode. The change in behavior affects drawing and building paint PBVH. Thus it affects brushes, but not menu operators like Smooth or Normalize. In addition, this makes the Alt-H shortcut available even without any selection enabled, and implements Hide for vertex selection. Differential Revision: https://developer.blender.org/D14163
2022-07-08Geometry Nodes: new geometry attribute APIJacques Lucke
Currently, there are two attribute API. The first, defined in `BKE_attribute.h` is accessible from RNA and C code. The second is implemented with `GeometryComponent` and is only accessible in C++ code. The second is widely used, but only being accessible through the `GeometrySet` API makes it awkward to use, and even impossible for types that don't correspond directly to a geometry component like `CurvesGeometry`. This patch adds a new attribute API, designed to replace the `GeometryComponent` attribute API now, and to eventually replace or be the basis of the other one. The basic idea is that there is an `AttributeAccessor` class that allows code to interact with a set of attributes owned by some geometry. The accessor itself has no ownership. `AttributeAccessor` is a simple type that can be passed around by value. That makes it easy to return it from functions and to store it in containers. For const-correctness, there is also a `MutableAttributeAccessor` that allows changing individual and can add or remove attributes. Currently, `AttributeAccessor` is composed of two pointers. The first is a pointer to the owner of the attribute data. The second is a pointer to a struct with function pointers, that is similar to a virtual function table. The functions know how to access attributes on the owner. The actual attribute access for geometries is still implemented with the `AttributeProvider` pattern, which makes it easy to support different sources of attributes on a geometry and simplifies dealing with built-in attributes. There are different ways to get an attribute accessor for a geometry: * `GeometryComponent.attributes()` * `CurvesGeometry.attributes()` * `bke::mesh_attributes(const Mesh &)` * `bke::pointcloud_attributes(const PointCloud &)` All of these also have a `_for_write` variant that returns a `MutabelAttributeAccessor`. Differential Revision: https://developer.blender.org/D15280
2022-07-08Cleanup: make formatDalai Felinto
2022-07-08Draw: Curve outline drawing in object mode.Jeroen Bakker
This patch adds (selected/active) outline around a curve object in object mode. {F13270680} In the past the draw bounds option was enabled for any curve objects. With this patch it isn't needed and will be disabled. In the future the curve outline could also be enabled to improve GPU selection. Reviewed By: dfelinto, HooglyBoogly, fclem Maniphest Tasks: T95933 Differential Revision: https://developer.blender.org/D15308
2022-07-08Cleanup: Move mesh legacy conversion to a separate fileHans Goudey
It's helpful to make the separation of legacy data formats explicit, because it declutters actively changed code and makes it clear which areas do not follow Blender's current design. In this case I separated the `MFace`/"tessface" conversion code into a separate blenkernel .cc file and header. This also makes refactoring to remove these functions simpler because they're easier to find. In the future, conversions to the `MLoopUV` type and `MVert` can be implemented here for the same reasons (see T95965). Differential Revision: https://developer.blender.org/D15396
2022-07-08Cleanup: formatCampbell Barton
2022-07-07Curves: Add sculpt selection overlayHans Goudey
This commit adds visualization to the selection in curves sculpt mode. Previously it was only possible to see the selection when it was connected to a material. In order to obstruct the users vision as little as possible, the selected areas of the curve are left as is, but a dark overlay is drawn over unselected areas. To make it work, the overlay requests the selection attribute and then ensures that the evaluation is complete for curves. Then it retrieves the evaluated selection GPU texture and passes that to the shader. This reuses the existing generic attribute extraction system because there currently wouldn't be any benefits to dealing with selection separately, and because it avoids duplication of the logic that extracts attributes from curves and evaluates them if necessary. Differential Revision: https://developer.blender.org/D15219
2022-07-07Fix T99270: bones using empties as custom shapes can't be selectedCampbell Barton
Regression in [0] which didn't account for the bounds of empty objects. Add support support calculating bounds from empty draw-type to use in pose-bone culling. [0]: 3267c91b4d5caab7da8aef071a446dd2e86f86a9
2022-07-04Fix T98884: Fix edge case crashes in gpu subdiv cache codeJoseph Eagar
2022-07-04Cleanup: Rename curve segment count functionHans Goudey
`curve_segment_num` -> `segments_num`. The "curve" prefix is reduntant for a function in the curve namespace.