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-05-26Cleanup: formatCampbell Barton
2022-05-25Merge branch 'blender-v3.2-release'Bastien Montagne
2022-05-25Fix vertex format for mesh attributes with GPU subdivisionKévin Dietrich
A global variable was mistakenly used here which would accumulate the vertex attributes (leading to an assertion failure after a while), use the wrong number of components depending on the attribute data type, among other issues.
2022-05-25Fix T98365: Overlay: Blender 3.2.0 Beta crashes on startupClément Foucault
This was caused by a wrong mass rename on a piece of code used only on older hardware.
2022-05-25Fix T96080: hiding elements does not work with GPU subdivKévin Dietrich
Faces, edges, and vertices are still shown when GPU subdivision is actived. This is because the related edit mode flags were ignored by the subdivision code. The flags are now passed to the various compute shaders mostly as part of the extra coarse data, also used for e.g. selection. For loose edges, a temporary buffer is created when extracting them. Loose vertices are already taken into account as it reuses the routines for coarse mesh extraction, although `MeshRenderData.use_hide` was not initialized, which is fixed now.
2022-05-24Cleanup: make formatJacques Lucke
2022-05-24EEVEE: support Curves attributes renderingKévin Dietrich
This adds support to render Curves attributes in EEVEE. Each attribute is stored in a texture derived from a VBO. As the shading group needs the textures to be valid upon creation, the attributes are created and setup during its very creation, instead of doing it lazily via create_requested which we cannot rely on anyway as contrary to the mesh batch, we do cannot really tell if attributes need to be updated or else via some `DRW_batch_requested`. Since point attributes need refinement, and since attributes are all cast to vec4/float4 to account for differences in type conversions between Blender and OpenGL, the refinement shader for points is used as is. The point attributes are stored for each subdivision level in CurvesEvalFinalCache. Each subdivision level also keeps track of the attributes already in use so they are properly updated when needed. Some basic garbage collection was added similar to what is done for meshes: if the attributes used over time have been different from the currently used attributes for too long, then the buffers are freed, ensuring that stale attributesare removed. This adds `CurvesInfos` to the shader creation info, which stores the scope in which the attributes are defined. Scopes are stored as booleans, in an array indexed by attribute loading order which is also the order in which the attributes were added to the material. A mapping is necessary between the indices used for the scoping, and the ones used in the Curves cache, as this may contain stale attributes which have not been garbage collected yet. Common utilities with the mesh code for handling requested attributes were moved to a separate file. Differential Revision: https://developer.blender.org/D14916
2022-05-23Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-23Fix Eevee blackbody wrong with non-default scene linear color spaceBrecht Van Lommel
* Port over new code tables from Cycles * Convert Rec.709 to scene linear for lookup table. * Move code for wavelength and blackbody to IMB so they can access the required transforms, which are not in blenlib. * Remove clamping from blackbody shader to bypass the texture read. Since it's variable now easiest to just always read from the texture than pass additional parameters. * Fold XYZ to RGB conversion into the wavelength table. Ref T68926
2022-05-23Cleanup: GPU: Remove `gpu_shader_common_obinfos_lib.glsl`Clément Foucault
This has been replaced by `draw_object_infos`.
2022-05-23Fix T98251: EEVEE: Regression: Wrong normalmaps on scaled objectsClément Foucault
This was caused by a missing `normalize`.
2022-05-23Cleanup: GPU: Remove `gpu_shader_common_obinfos_lib.glsl`Clément Foucault
This has been replaced by `draw_object_infos`.
2022-05-23Fix T98251: EEVEE: Regression: Wrong normalmaps on scaled objectsClément Foucault
This was caused by a missing `normalize`.
2022-05-23Merge branch 'blender-v3.2-release'Clément Foucault
2022-05-23DRW: Fix signed/unsigned mismatches in shader codeJohannes J
Fix the following error messages on Blender startup since commit 308a12ac647d6f9b4ef2b6c403903e0aeb65a571. This commit fixes T98194. Reviewed By: fclem Differential Revision: https://developer.blender.org/D15007
2022-05-23Merge branch 'blender-v3.2-release'Clément Foucault
2022-05-23Fix T98128: EEVEE: Regression: Inverted surface normal on MacOS Intel GPUClément Foucault
This seems to be caused by the `!` used in conjunction with a macro. Using the macro directly as condition does not exhibit this issue.
2022-05-22GPU subdiv: smoothly interpolate orco layerKévin Dietrich
This uses the recently introduced evaluator's vertex data to smoothly interpolate original coordinates instead of using linear interpolation. The orcos are interpolated at the same time as positions and as such, the specific subdivision routine for the orco extractor has been removed. The patch evaluation shader uses a definition to enable code specific to orco evaluation. Since the orco layer may not have been requested on first render, and since orco data is now stored in the OpenSubDiv evaluator, the evaluator needs to be recreated if an orco layer is suddenly available. For this, a callback to check if the evaluator has the data was added. This is added to the evaluator as the `Subdiv` cache stored in the modifier is invalidated less often than the Mesh batch cache and so leads to fewer evaluator recreations. Differential Revision: https://developer.blender.org/D14999
2022-05-19Cleanup: spelling in comments & move doc-strings to headersCampbell Barton
2022-05-19Cleanup: format, reduce line length & strip trailing spaceCampbell Barton
2022-05-19DRW: GPU wrappers: Fix resize routines for StorageArrayBufferClément Foucault
Resizing was not resizing the `data_` buffer. Also use `power_of_2_max_u`.
2022-05-19EEVEE-Next: Fix error on curve prepass caused by velocity commitClément Foucault
2022-05-19EEVEE-Next: Fix display of compiling shader countdownClément Foucault
Also fix naming convention on public variable.
2022-05-19EEVEE-Next: Display error instead of crashing on unsupported hardwareClément Foucault
This message will remain in effect until we bump up the minimum hardware requirement.
2022-05-19EEVEE-Next: Fix memory leakClément Foucault
2022-05-19EEVEE-Next: Add Velocity moduleClément Foucault
This module allow tracking of object and geometry data accross time. This commit adds no user visible changes. It work in both viewport (*) and render mode, gives correct motion for any camera projection type and is compatible with displacement (**). It is a huge improvement upon the old EEVEE velocity which was only used for motion blur and only available in render. It is also an improvement for speed as the animated objects do not need to be rendered a 3rd time. The code is also much cleaner: no GPUVertBuf duplication, no GPUBatch amendment, no special cases for different geometry types, no DRWShadingGroup per object, no double buffering of velocity. The module is still work in progress as the final output may still be flawed. (*): Viewport support is already working but there might be some cases where mapping will fail. For instance if topology changes but not vertex count. (**): Displacement does not contribute to motion vectors. Surfaces using displacement will have the same motion vectors as if they were not displaced.
2022-05-19DRW: Wrappers: Use runtime length of the buffer instead of the initial lenClément Foucault
This could have produce errors especially in the iterators.
2022-05-19DRW: Replace StorageFlexibleBuffer with explicit `get_or_resize()`Clément Foucault
This is to avoid hiding resize inside the `[]` operator.
2022-05-19DRW: Fix DRW_shgroup_buffer_texture namingClément Foucault
We do not need `_ex` suffix.
2022-05-17Merge branch 'blender-v3.2-release'Bastien Montagne
2022-05-17Fix T98052: Eevee / Workbench background render crash with GPU subdivisionBrecht Van Lommel
The problem is that depsgraph evaluation happens before the OpenGL context is initialized, and so modifier evaluation happens without GPU subdivision. Later the BKE_subsurf_modifier_can_do_gpu_subdiv test in the draw code gives a different result. This just checks if the mesh has information for GPU subdivision in the draw code, and if so uses it. This is only set if the test for supported GPU subdivision passes in the modifier evaluation. Additionally it may be good to perform OpenGL context initialization earlier so background render can take advantage of GPU subdivision, but this is more complicated. Differential Revision: https://developer.blender.org/D14969
2022-05-17EEVEE-Next: Fix missing break in switch statementClément Foucault
2022-05-17EEVEE-Next: Add camera moduleClément Foucault
2022-05-17DRW: Add DRW_view_camtexco_get()Clément Foucault
2022-05-17DRWWrapper: Add StorageFlexibleBufferClément Foucault
This buffer resizes on access.
2022-05-17DRW: Add SwapChain container to allow easier usage of double bufferingClément Foucault
The template also takes the length of the chain to allow triple buffering.
2022-05-17Cleanup: formatCampbell Barton
2022-05-15Cleanup: Move three mesh editors files to C++Hans Goudey
Simplifies refactoring in D14685, allows use of better data structures.
2022-05-15Cleanup: Clang tidyHans Goudey
2022-05-15DRW: Remove accidentaly commited stray global variableClément Foucault
2022-05-15GPUVertBuf: Add support for binding as buffer textureClément Foucault
This is often needed and somehow cumbersome to set up. This will allow some code simplifications.
2022-05-15Cleanup: Fix compile warnings on windowsHans Goudey
2022-05-14Cleanup: Further use of const for retrieved custom data layersHans Goudey
Similar to cf69652618fefcd22b2cde9a2.
2022-05-13Cleanup: Use const when retrieving custom data layersHans Goudey
Knowing when layers are retrieved for write access will be essential when adding proper copy-on-write support. This commit makes that clearer by adding `const` where the retrieved data is not modified. Ref T95842
2022-05-13Merge branch 'blender-v3.2-release'Sergey Sharybin
2022-05-13Fix T97330: UV points missing with some modifiersKévin Dietrich
When extracting UV point indices, only the vertex points coming from the original geometry should be drawn. For this, the routines (for subdivision and coarse meshes) would only consider a vertex to be real if the extraction type is `MAPPED`, and that an origin index layer on the vertices exist with a valid origin index for the current vertex. However, if the extraction type is `MESH`, which can happen with for example an empty Geometry Node modifier, or with deferred subdivision, this would consider every vertex to not be "real" and therefore hidden from the UV editor. This reworks the condition for "realness" to also consider a vertex to be real if there is no origin layer on the vertices. The check on the extraction type is removed as it becomes redundant. This only modifies the check in the UV data extraction for point indices, however similar checks exist throughout the extraction code, these will be dealt with separately in master. Differential Revision: https://developer.blender.org/D14773
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-05-12DRW: Fix Compilation on OSXClément Foucault
Caused by rBe4bb898e40ee
2022-05-12DRW: Port draw_shader to C++Clément Foucault
2022-05-12DRW: Port draw_hair to C++Clément Foucault