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-10-15Sculpt: Fix draw artifacts when drawing multires maskJoseph Eagar
2022-10-15Sculpt: do not validate PBVH draw data in mesh_batch_cache_validJoseph Eagar
Turns out PBVH drawing and normal mesh batches are not mutually exclusive inside the draw cache; there are edge cases with modifiers and instancing where you need both, and forcing one or the other inside this function leads to memory corruption.
2022-10-14Fix: Draw: Initialize StencilSet in the correct orderMiguel Pozo
tmp
2022-10-14Cleanup: Small changes to curves draw cacheHans Goudey
- Remove unused include - Avoid repeating blender:: namespace - Remove timer left in by mistake in previous commit
2022-10-14Curves: Multithread position vertex buffer extractionHans Goudey
On a Ryzen 3700x I observed a 4ms improvement (from 5ms to 1ms) on every redraw when sculpting with 88000 curves.
2022-10-13Fix: Crash updating draw cache of original curves dataHans Goudey
Error in c67e5628d22f8348492 which mistook clearing the pointer for clearing the values in the struct.
2022-10-13Cleanup: Use std::mutex for mesh runtime mutexesHans Goudey
Instead of allocating three separate ThreadMutex pointers, just embed std::mutex into the struct directly.
2022-10-13Mesh: Move runtime data out of DNAHans Goudey
This commit replaces the `Mesh_Runtime` struct embedded in `Mesh` with `blender::bke::MeshRuntime`. This has quite a few benefits: - It's possible to use C++ types like `std::mutex`, `Array`, `BitVector`, etc. more easily - Meshes saved in files are slightly smaller - Copying and writing meshes is a bit more obvious without clearing of runtime data, etc. The first is by far the most important. It will allows us to avoid a bunch of manual memory management boilerplate that is error-prone and annoying. It should also simplify future CoW improvements for runtime data. This patch doesn't change anything besides changing `mesh.runtime.data` to `mesh.runtime->data`. The cleanups above will happen separately. Differential Revision: https://developer.blender.org/D16180
2022-10-13Draw: Add missing TBB define to draw moduleHans Goudey
Allows improving performance with BLI_task.hh in draw extraction code. Threading added in c15a63d21eae49ffd improved performance by 3-4x for me, but didn't make a difference until now.
2022-10-12Cleanup: EEVEE-Next: Add precision to commentClément Foucault
2022-10-12DRW: View: Expose matrices through interfaceClément Foucault
2022-10-12DRW: Wrappers: Add TextureRef to wrap around GPUTexture pointersClément Foucault
This adds the possibility to use the C++ API for other GPUTexture.
2022-10-12DRW: Fix gl error related to incorrect uniform sizeClément Foucault
2022-10-12Cleanup: DRW: Improve state_stencil documentationClément Foucault
2022-10-12ImageEngine: Clamp image data to fit half float range.Jeroen Bakker
When image data exceeds half float ranges values are set to +/- infinity that could lead to artifacts later on in the pipeline. Color management for example. This patch adds a utility function `IMB_gpu_clamp_half_float` that clamps full float values to fit within the range of half floats. This fixes T98575 and T101601.
2022-10-12UV: add grid shape source to the uv editor, and add new "pixel" optionChris Blackbourn
This change is part of a wider set of changes to implement Grid and Pixel snapping in the UV Editor. This particular change adds a new third option, `pixel grid`, to the previous grid options, `dynamic grid` and `fixed grid`. Maniphest Tasks : T78391 Differential Revision: https://developer.blender.org/D16197
2022-10-11Cleanup: Move draw_cache_impl_volume.c to C++Hans Goudey
2022-10-11Sculpt: Fix mask from cavity not redrawing viewport with modifiersJoseph Eagar
2022-10-11Sculpt: Fix T101674: Passing null to GPU_batch_elembuf_setJoseph Eagar
2022-10-10EEVEE-Next: Fix surface deferred shader compilation in debug modeClément Foucault
2022-10-10Cleanup: quiet warnings, formatCampbell Barton
2022-10-09Cleanup: Remove data duplication from large array in eevee_camera.hhJesse Yurkovich
Use `inline constexpr` instead of `static const` to prevent these variables from being duplicated in each translation unit that includes the eevee_camera.hh header (was included into 17 different object files with MSVC). Differential Revision: https://developer.blender.org/D16200
2022-10-08Attribute Node: support accessing attributes of View Layer and Scene.Alexander Gavrilov
The attribute node already allows accessing attributes associated with objects and meshes, which allows changing the behavior of the same material between different objects or instances. The same idea can be extended to an even more global level of layers and scenes. Currently view layers provide an option to replace all materials with a different one. However, since the same material will be applied to all objects in the layer, varying the behavior between layers while preserving distinct materials requires duplicating objects. Providing access to properties of layers and scenes via the attribute node enables making materials with built-in switches or settings that can be controlled globally at the view layer level. This is probably most useful for complex NPR shading and compositing. Like with objects, the node can also access built-in scene properties, like render resolution or FOV of the active camera. Lookup is also attempted in World, similar to how the Object mode checks the Mesh datablock. In Cycles this mode is implemented by replacing the attribute node with the attribute value during sync, allowing constant folding to take the values into account. This means however that materials that use this feature have to be re-synced upon any changes to scene, world or camera. The Eevee version uses a new uniform buffer containing a sorted array mapping name hashes to values, with binary search lookup. The array is limited to 512 entries, which is effectively limitless even considering it is shared by all materials in the scene; it is also just 16KB of memory so no point trying to optimize further. The buffer has to be rebuilt when new attributes are detected in a material, so the draw engine keeps a table of recently seen attribute names to minimize the chance of extra rebuilds mid-draw. Differential Revision: https://developer.blender.org/D15941
2022-10-08Viewport: Enable draw_debug.cc code when WITH_DRAW_DEBUG is onJoseph Eagar
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-10-07Cleanup: DRW: Rename ViewInfos to ViewMatricesClément Foucault
This makes sense now that the struct only contains matrices.
2022-10-07DRW: Remove mouse_pixel and is_inverted from ViewInfosClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering. `mouse_pixel` is only use for debug purpose and will be reintroduced later. `is_inverted` is moved to `draw::View`.
2022-10-07DRW: Remove viewport_size from DRWViewClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering.
2022-10-07EEVEE-Next: Use global viewport size instead of DRWView oneClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering.
2022-10-07GPencil: Use global viewport size instead of DRWView oneClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering.
2022-10-07Basic: Use global viewport size instead of DRWView oneClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering.
2022-10-07Overlay: Use global viewport size instead of DRWView oneClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering.
2022-10-07DRW: Remove screen_vecsClément Foucault
These were only a normalized copy of the XY axes of the inverse viewmat. But since the viewmatrix is always normalized we can use it directly.
2022-10-07DRW: Move clipping planes to their own UBOClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering.
2022-10-07EEVEE: Move reflection clip plane to local storageClément Foucault
This avoid dependency with the draw view.
2022-10-07DRW: Use view_clipping_distances instead of world_clip_planes_set_clip_distanceClément Foucault
No functional change. `view_clipping_distances` is prefered as it is auto masked.
2022-10-07DRW: Remove view vectorsClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering. The viewvecs can easilly be replace by projection matrix operation. Even if slightly more complex, there is no performance impact.
2022-10-07DRW: Move CameraTexCoFactors to engine specific storageClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering. The CameraTexCoFactors being only valid for a single view, and being only used in very few places, it make sense to move it to the engine side.
2022-10-07DRW: Split ViewCullingData out of ViewInfosClément Foucault
This is in order to reduce the size of ViewInfos and support multi view rendering.
2022-10-07Cleanup: spelling in commentsCampbell Barton
2022-10-07Sculpt: Fix T101502: GPU tris miscounted for dyntopoJoseph Eagar
Dyntopo PBVH draw was miscounting the number of triangles.
2022-10-06DRW: fix use of potentially uninitialized variableGermano Cavalcante
Bug introduced in rB6774cae3f25b. This causes undefined behavior in `DRW_state_draw_support()` making overlay depth drawing unpredictable.
2022-10-06Cleanup: spelling in code commentsCampbell Barton
2022-10-05Cleanup: make formatBrecht Van Lommel
2022-10-05Sculpt: Fix crash in dyntopo drawJoseph Eagar
2022-10-05Cleanup: Clang tidyHans Goudey
Also remove unnecessary struct keywords in C++ files.
2022-10-05DRW: Split ViewProjectionMatrix in order to increase precisionClément Foucault
This also removes the need to compute the persmat and saves some memory from the `ViewInfos` struct. This is needed to allow multiview support. Initial testing found no major performance regression during vertex heavy workload. Test file: {F13610017} Results: | Platform | Master | Split Matrix| | Linux + Mesa + AMD W6600 | 48 fps | 47 fps | | Macbook Pro M1 | 50 fps | 51 fps | | Linux + NVidia 1080Ti | 51 fps | 52 fps | | Linux + Radeon Vega 64 | 25.6 fps | 26.7 fps | Increased precision when far from origin: {F13610024} {F13610025} Reviewed By: jbakker Differential Revision: https://developer.blender.org/D16125
2022-10-04Always initialize MaterialPass (Fixes a crash in mscv)Miguel Pozo
Differential Revision: https://developer.blender.org/D16134
2022-10-04Cleanup: Remove commented out code in ssr_lib.glsl.Jeroen Bakker
2022-10-04Fix T101438: Wrong LOD selection after clamping the mip value (Nvidia)Miguel Pozo
Fix for T101438 Clamping the mip seems to always set it to 9.0. I couldn't find an alternative way to avoid triggering the error (ie. min(mip, 9.0)). In any case, the results with this patch applied look the same to the (correct) ones on AMD. And, since clamping the max mip to a hardcoded value could result in resolution-depended behavior, I guess disabling the clamp should be ok anyway. Reviewed By: fclem Maniphest Tasks: T101438 Differential Revision: https://developer.blender.org/D16129