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-06-18Cleanup: Remove unused argument, unnecessary struct keywordHans Goudey
2022-06-05Cleanup: Move remaining mesh draw code to C++Hans Goudey
After this commit, all mesh data extraction and drawing code is in C++, including headers, making it possible to use improved types for future performance improvements and simplifications. The only non-trivial changes are in `draw_cache_impl_mesh.cc`, where use of certain features and macros in C necessitated larger changes. Differential Revision: https://developer.blender.org/D15088
2022-05-14Cleanup: Further use of const for retrieved custom data layersHans Goudey
Similar to cf69652618fefcd22b2cde9a2.
2022-05-03Fix T93179: geonodes UVs and Vertex colors do not work in EEVEEKévin Dietrich
Overwriting UV map or vertex color data in Geometry nodes will move the layers to another CustomData channel, and as such, will make attribute lookup fail from the UVMap and Vertex Color nodes in EEVEE as the CustomDataType will also be modified (i.e. no longer `CD_MTFACE` or `CD_MCOL`). As discussed in T93179, the solution is to use `CD_PROP_AUTO_FROM_NAME` so that the render engine is able to find the attributes. This also makes EEVEE emulate Cycles behaviour in this regard. `attr_load_uv` and `attr_load_color` are also removed in favor of the generic attribute API in the various GLSL shaders. Although `CD_PROP_AUTO_FROM_NAME` is now used even for UV maps, the active UV map is still used in case the attribute name is empty, to preserve the old behavior. Differential Revision: https://developer.blender.org/D13730
2022-03-16Cleanup: incorrect comments, use C commentsCampbell Barton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-12-27OpenSubDiv: add support for an OpenGL evaluatorKévin Dietrich
This evaluator is used in order to evaluate subdivision at render time, allowing for faster renders of meshes with a subdivision surface modifier placed at the last position in the modifier list. When evaluating the subsurf modifier, we detect whether we can delegate evaluation to the draw code. If so, the subdivision is first evaluated on the GPU using our own custom evaluator (only the coarse data needs to be initially sent to the GPU), then, buffers for the final `MeshBufferCache` are filled on the GPU using a set of compute shaders. However, some buffers are still filled on the CPU side, if doing so on the GPU is impractical (e.g. the line adjacency buffer used for x-ray, whose logic is hardly GPU compatible). This is done at the mesh buffer extraction level so that the result can be readily used in the various OpenGL engines, without having to write custom geometry or tesselation shaders. We use our own subdivision evaluation shaders, instead of OpenSubDiv's vanilla one, in order to control the data layout, and interpolation. For example, we store vertex colors as compressed 16-bit integers, while OpenSubDiv's default evaluator only work for float types. In order to still access the modified geometry on the CPU side, for use in modifiers or transform operators, a dedicated wrapper type is added `MESH_WRAPPER_TYPE_SUBD`. Subdivision will be lazily evaluated via `BKE_object_get_evaluated_mesh` which will create such a wrapper if possible. If the final subdivision surface is not needed on the CPU side, `BKE_object_get_evaluated_mesh_no_subsurf` should be used. Enabling or disabling GPU subdivision can be done through the user preferences (under Viewport -> Subdivision). See patch description for benchmarks. Reviewed By: campbellbarton, jbakker, fclem, brecht, #eevee_viewport Differential Revision: https://developer.blender.org/D12406
2021-08-23Cleanup: rename 'MeshBufferCache' to 'MeshBufferList'Germano Cavalcante
`MeshBufferList` is more specific and can avoid confusion with `MeshBufferExtractionCache`.
2021-07-26Cleanup: Rearrange mesh extraction filesGermano Cavalcante
In the draw module, it's not easy to identify what its header is, and where the shared functions are. So move `draw_cache_extract_mesh_extractors.c` and `draw_cache_extract_mesh_private.h` to the same folder as the extractors and rename these files to make them more identifiable. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D11991
2021-07-01Cleanup: Separate each extractor into specific compile unitsGermano Cavalcante
Makes code cleaner and easier to find.