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-04Cleanup: clang-tidyCampbell Barton
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-04-04Cleanup: clang-formatCampbell Barton
Add ccl_gpu_kernel_postfix as a statement macro to prevent the following declarations from being indented.
2022-04-02Cleanup: Further use of const for object bounding boxesHans Goudey
Also solves two warnings from the previous similar commit, f688e3cc3130e70e77f0bb0. The change to the grease pencil modifier is quite suspicious, but doesn't change the behavior, which was already broken.
2022-03-31GPencil: Fix regression with dots uvsClément Foucault
This was introduced by rBeccb0b222e3465baa71430223c5ee2f0206a7b02.
2022-03-31DRW: Rename DRW_shgroup_uniform_vec4_array_copy to mat4_copyClément Foucault
This function was not used for anything other than mat4. This was because of a limitation of the DRW module/ This makes it cleaner for the GLSL and also less tempting to use it for other unconventional purpose.
2022-03-31Fix T96920 DRW: Regression: Hair strands are drawn in wrong placeClément Foucault
This was caused by the recent changes made to the way we handle matrix copies. The matrix copy assumed that the uniform iteration was the same as creation order. But this was far from true. The reality was that the iterator was reverse for `unichunk` but not for `unichunk->uniforms` so this was recreating wrong matrix. I rewrote this part to always use reverse iteration and fix the copy destination. Also I simplified the code making the assumption this won't be used for anything else than mat4.
2022-03-31Fix T96915: GPU subdivision modifier: Smooth Shade doesn't workKévin Dietrich
Simple error in an earlier commit, the flags should be or-ed.
2022-03-31Cleanup: Unused variable in release build warningSergey Sharybin
2022-03-31Cleanup: spelling, trailing space for comment-blocksCampbell Barton
2022-03-31Cleanup: Curves draw cache renaming, use referencesHans Goudey
Also change some remaining cases of "hair object" to "curves object".
2022-03-30Metal: Adding alternative support for GPU_PRIM_TRI_FAN/LINE_LOOP For Metal ↵Jason Fielder
backend. - Metal uniform array compatibility in DRW module. - Guard OpenGL-specific workarounds and flushes behind GPU_type_matches_ex API guard. Add further render boundaries for render paths called outside of the main loop. Authored by Apple: Michael Parkin-White Ref: T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D14438
2022-03-30Metal: GLSL Shader compatibility 5Jason Fielder
MSL does not have an implicit global scope, this is emulated via macro's adding an indirection for uniforms, attributes, shader stage inputs and outputs such as: #define roughness shaderinst->roughness. Variables in GLSL which exist within uniform blocks can be directly referenced via the global scope, unlike standard C++. This means that variable name pollution occurs if subsequent local variables in the code use the same name, resulting in compilation errors. A number of these conflicting names have been renamed to ensure unique naming and no further scope pollution. Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14452
2022-03-30Fix T96344: edit mode GPU subdivision crashes with X-ray mode and modifiersKévin Dietrich
The crash happens because the origindex layers created as part of the modifier stack evaluation are not set in the `MeshRenderData` when they should have been. This is because when selecting in X-ray mode, a subdivision wrapper is created to ensure that selection happens with a subdivided geometry, and this replaces the `MDATA` wrapper which is also used to setup the `MeshRenderData`. As we do not seemingly have an `MDATA` wrapper, the draw code decides that we can extract draw buffers directly from the BMesh, instead of the mapped Mesh with origin indices layers. To fix this, we should also consider to use mapped extraction if a subdivision wrapper exists on the mesh. Differential Revision: https://developer.blender.org/D14485
2022-03-30Overlay: Port Armature shader to ShaderCreateInfoClément Foucault
Should have no regression.
2022-03-30Overlay: Port Edit Mode shaders to ShaderCreateInfoClément Foucault
This should have no regression.
2022-03-30DRW: Port draw_common.c to use shared definition with GLSLClément Foucault
# Conflicts: # source/blender/draw/intern/draw_common_shader_shared.h # source/blender/draw/intern/shaders/draw_view_info.hh
2022-03-29Fix T96356: artefacts with GPU subdivision and vertex paint maskKévin Dietrich
The lines paint mask IBO extraction was not implemented for GPU subdivision. For it to work, we also now need to preserve the subdivision loop to subdivision edge map, which until now was overwritten to store coarse edges (the map to coarse edges is still preserved). Also the paint flag stored in the 4th dimension of the loop normal buffer was not properly set for flat shaded faces, leading to other kind of artefacts and render issues.
2022-03-26DRW: Port draw_common.c to use shared definition with GLSLClément Foucault
2022-03-25Cleanup: Further renaming in new curves codeHans Goudey
A follow-up to e253f9f66d6f. Follow the policy from T85728 completely (using "num" as a prefix) and rename another function.
2022-03-25Cleanup: spelling in comments, stringsCampbell Barton
2022-03-24Cleanup: Optimize viewport view data creationJesse Yurkovich
Each time the user clicks the viewport 2 sets of engine views are created. Each set is currently composed of 8 view objects, each of size 592 bytes. Because space is not reserved in the vector that holds them, several unnecessary re-allocation/copy cycles occur as the vector resizes and the total allocation load is 8880 bytes. This happens twice. Reduce to just the allocations necessary and with exactly 4736 bytes allocated for each set - Before: 8 allocations and 8 deallocations totaling 17760 bytes - After: 2 allocations and 2 deallocations totaling 9472 bytes Reviewed By: fclem, jbakker Differential Revision: https://developer.blender.org/D13782
2022-03-24Cleanup: Adjust naming in new curves codeHans Goudey
Rename "size" variables and functions to use "num" instead, based on T85728 (though this doesn't apply to simple C++ containers, it applies here). Rename "range" to "points" in some functions, so be more specific. Differential Revision: https://developer.blender.org/D14431
2022-03-23Cleanup: move documentation to headers, other minor correctionsCampbell Barton
2022-03-23Fix T96372: UV editor selection display wrong with GPU subdivisionKévin Dietrich
Vertices were not drawn properly as the logic for mapped mesh was used in the BMesh case. Edge display would ignore subdivided edges which would come from coarse edges when setting display flags.
2022-03-23Cleanup: spelling in commentsCampbell Barton
2022-03-22Metal: Make GLSL shader source MSL compliant alsoJason Fielder
Metal shading language follows the C++ 14 standard and in some cases requires a greater level of explicitness than GLSL. There are also some small language differences: - Explicit type-casts (C++ requirements) - Explicit constant values (C++ requirements, e.g. floating point values using 0.0 instead of 0). - Metal/OpenGL compatibility paths - GLSL Function prototypes - Explicit accessors for vector types when sampling textures. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14378
2022-03-20GPencil: Port main object shader to ShaderCreateInfoClément Foucault
This is quite a huge cleanup. Making use of the `common_gpencil_lib.glsl` to share more codes and use more consistent codestyle. The gpencil engine specifics are now out of the `gpencil_vertex()` function making it easier to add more features. There should be no regression as all workarounds are kept as is.
2022-03-20DRW: Port improvements in common_math_lib.glsl from `eevee-rewrite`Clément Foucault
Mostly quality of life functions and macros.
2022-03-20DRW: Make use of shader shared headerClément Foucault
# Conflicts: # source/blender/draw/intern/draw_manager.h # source/blender/draw/intern/draw_manager_exec.c # source/blender/draw/intern/draw_shader_shared.h
2022-03-20DRW: Introduce GPencil common GLSL libraryClément Foucault
This library contains the needed functions to render GPencil object geometry. Centralizing these will make it possible for other draw engines (EEVEE, Overlay) to reuse the same vertex shader code and possibly the same fragment rejection methods.
2022-03-20DRW: Add new texture from pool acquire/release mechanismClément Foucault
This adds a simple and more manageable temp texture behavior. The texture is garanteed to be available only between the acquire/release pair. This makes the same engine able to reuse the textures and even overlap the acquire & release calls.
2022-03-20DRW: GPU wrappers: Some quality of life improvementsClément Foucault
- Add name support to storage buffers - Delete view functions for TextureFromPool - Add support for different size acquire and assert on mulitple acquire - Allow multiple release
2022-03-18DRW: gpu wrappers: Fix compilation in release modeClément Foucault
2022-03-18GPUTexture: Add Cube view as 2D arrayClément Foucault
This is useful to read/write to the textures directly using compute shaders and imageLoad/Store.
2022-03-18DRW: Expose stencil view in gpu_wrapperClément Foucault
2022-03-18Cleanup: DRW: Fix comments in DRW_gpu_wrapperClément Foucault
2022-03-18DRW: Add support for compute indirect command.Clément Foucault
This just expose the GPU API through DRW.
2022-03-18DRW: Add simple texture view wrappers to draw::TextureClément Foucault
2022-03-18DRW: Add support for GPUStorageBuf in wrappersClément Foucault
# Conflicts: # source/blender/draw/engines/eevee/eevee_light.cc # source/blender/draw/engines/eevee/eevee_shadow.cc
2022-03-18DRW: Add support for GPUStorageBufClément Foucault
2022-03-18EEVEE: Add new experimental "EEVEE Next" optionClément Foucault
This is supposed to hold the latest improvement from the EEVEE rewrite branch. Note that a restart is necessary in order for the engine to appear. The registration code is a bit convoluted as it needs to be after the WM_init.
2022-03-18Cleanup: Rename "spline" variables to "curve"Hans Goudey
Ref T95355
2022-03-16Cleanup: incorrect comments, use C commentsCampbell Barton
2022-03-15Disable GPU subdivision if the maximum number of SSBO binding is reachedKévin Dietrich
Some old platforms and drivers have limited amount of SSBO binding per compute shader. This disables GPU subdivision if we cannot possibly bind all required buffers within this limit. For now the maximum number of buffers used by the GPU code is hardcoded, but will be programmatically detected when shader creation is automated. Ref D14337
2022-03-11Cleanup: use M_PI_2 and M_PI_4 where possibleHallam Roberts
The constant M_PI_4 is added to GLSL to ensure it works there too. Differential Revision: https://developer.blender.org/D14288
2022-03-11Cleanup: fix source comment typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14307
2022-03-10Cleanup: spelling in comments & some minor clarificationsCampbell Barton
2022-03-08Merge remote-tracking branch 'origin/blender-v3.1-release'Kévin Dietrich
2022-03-08Fix T96224: GPU subdiv crash with smooth normals and tangentsKévin Dietrich
Tangents are computed from UVs on the CPU side when using GPU subdivision and require that the normals are available there as well (at least for smooth shading, flat normals can be computed on the fly). This simply adds the missing normals update call for the `MeshRenderData` setup for the subdivision case. Differential Revision: https://developer.blender.org/D14278