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
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-07Merge branch 'blender-v2.90-release'Clément Foucault
2020-08-07Fix T78452 EEVEE: Motion Blur: Crash when using camera switchingClément Foucault
This was caused by the ViewLayer being freed with all its engine data.
2020-07-30GPU: Fix compilation errorClément Foucault
2020-07-30EEVEE: GLSL refactor/cleanupClément Foucault
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code complexity and duplication. - split bsdf_common_lib.glsl into multiple sub library which are now shared with other engines. - the surface shader code is now more organised and have its own files. - change default world to use a material nodetree and make lookdev shader more clear. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D8306
2020-07-30Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRWClément Foucault
2020-07-29Cleanup: GPU: Move Image based function to GPU_draw.hClément Foucault
This makes it less confusing what functions are for blender structures.
2020-07-15DRW: Shader: Fix const correctness and print better debug outputClément Foucault
2020-07-15DRW: Shader: Add DRW_shader_create(_fullscreen)_with_shaderlibClément Foucault
Some convenience function for using DRWShaderLibrary.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-06-23EEVEE: Motion Blur: Add accumulation motion blur for better precisionClément Foucault
This revisit the render pipeline to support time slicing for better motion blur. We support accumulation with or without the Post-process motion blur. If using the post-process, we reuse last step next motion data to avoid another scene reevaluation. This also adds support for hair motion blur which is handled in a similar way as mesh motion blur. The total number of samples is distributed evenly accross all timesteps to avoid sampling weighting issues. For this reason, the sample count is (internally) rounded up to the next multiple of the step count. Only FX Motion BLur: {F8632258} FX Motion Blur + 4 time steps: {F8632260} FX Motion Blur + 32 time steps: {F8632261} Reviewed By: jbakker Differential Revision: https://developer.blender.org/D8079
2020-06-19EEEVEE: Object Motion Blur: Initial ImplementationClément Foucault
This adds object motion blur vectors for EEVEE as well as better noise reduction for it. For TAA reprojection we just compute the motion vector on the fly based on camera motion and depth buffer. This makes possible to store another motion vector only for the blurring which is not useful for TAA history fetching. Motion Data is saved per object & per geometry if using deformation blur. We support deformation motion blur by saving previous VBO and modifying the actual GPUBatch for the geometry to include theses VBOs. We store Previous and Next frame motion in the same motion vector buffer (RG for prev and BA for next). This makes non linear motion blur (like rotating objects) less prone to outward/inward blur. We also improve the motion blur post process to expand outside the objects border. We use a tile base approach and the max size of the blur is set via a new render setting. We use a background reconstruction method that needs another setting (Background Separation). Sampling is done using a fixed 8 dithered samples per direction. The final render samples will clear the noise like other stochastic effects. One caveat is that hair particles are not yet supported. Support will come in another patch. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7297
2020-06-08Workbench: Use eGPUSamplerState to change texture sampling behaviorClément Foucault
This removes some fragment shader hacks and improve the support of different repeat & filtering modes. This fix T77453 Image texture not repeating in viewport
2020-06-03Cleanup: DRW: Remove builtin 3D only shader usageClément Foucault
2020-06-03Cleanup: DRW: Remove persistent uniform functionsClément Foucault
2020-06-02EEVEE: Refactor of eevee_material.cClément Foucault
These are the modifications: -With DRW modification we reduce the number of passes we need to populate. -Rename passes for consistent naming. -Reduce complexity in code compilation -Cleanup how renderpass accumulation passes are setup, using pass instances. -Make sculpt mode compatible with shadows -Make hair passes compatible with SSS -Error shader and lookdev materials now use standalone materials. -Support default shader (world and material) using a default nodetree internally. -Change BLEND_CLIP to be emulated by gpu nodetree. Making less shader variations. -Use BLI_memblock for cache memory allocation. -Renderpasses are handled by switching a UBO ref bind. One major hack in this patch is the use of modified pointer as ghash keys. This rely on the assumption that the keys will never overlap because the number of options per key will never be bigger than the pointed struct. The use of one single nodetree to support default material is also a bit hacky since it won't support concurent usage of this nodetree. (see EEVEE_shader_default_surface_nodetree) Another change is that objects with shader errors now appear solid magenta instead of shaded magenta. This is only because of code reuse purpose but could be changed if really needed. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7642
2020-06-02DrawManager: Graph Task SchedulingJeroen Bakker
This patch uses a graph flow scheduler for creating all mesh batches. On a Ryzen 1700 the framerate of Spring/020_02A.anim.blend went from 10 fps to 11.5 fps. For each mesh where batches needs to be updated a sub-graph will be added to the task_graph. This sub-graph starts with an extract_render_data_node. This fills/converts the required data from Mesh. Small extractions and extractions that can't be multi-threaded are grouped in a single `extract_single_threaded_task_node`. Other extractions will create a node for each loop exceeding 4096 items. these nodes are linked to the `user_data_init_task_node`. the `user_data_init_task_node` prepares the userdata needed for the extraction based on the data extracted from the mesh. Note: If the `lines` and `lines_loose` are requested, the `lines_loose` sub-buffer is created as part of the lines extraction. When the lines_loose is only requested the sub-buffer is created from the existing `lines` buffer. It is assumed that the lines buffer is always requested before or together with the lines_loose what is always the case (see `DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES)` in `draw_cache_impl_mesh.c`). Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7618
2020-05-28DRW: Add DRW_shgroup_uniform_vec4_array_copyClément Foucault
2020-05-14Fix T75908: Sculpt GPU Batches + Render ArtifactsJeroen Bakker
When sculpting the GPU batches are constructed with only the required data for a single viewport. When that viewport changes shading or coloring mode (object to vertex) batches might not hold all the needed information. There is also a case when you have two 3d viewport one in object color mode and the other in vertex color mode that the GPU batches were updated without any vertex colors. In order to fix these category of issues this patch would always construct the full GPU batches for sculpting. Reviewed By: Clément Foucault, Pablo Dobarro Maniphest Tasks: T75908 Differential Revision: https://developer.blender.org/D7701
2020-04-22Fix T75981: crash in sculpt mode with mesh that used to have multiple materialsBrecht Van Lommel
The material indices in a mesh can exceed the number of available materials slots in the object or mesh, sculpt drawing was not taking that into account.
2020-04-03Cleanup: use term 'attr' instead of 'attrib'Campbell Barton
This was already the case in most parts of the GPU API. Use full name for descriptive-comments.
2020-03-31Fix T74898: Multiresolution Ghost After OrbitingJeroen Bakker
EEVEE and Workbench both had the same issue that they continue with the last sample when leaving navigating. This is ok for regular meshes as they are all the same. For multiresolution it ain't as a low res version of the mesh is used during navigation. This patch also resets the AA samples when the user leaves navigation.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-14Cleanup: sort file lists & struct declatationsCampbell Barton
2020-03-12DrawManager: Pack Draw State BitsJeroen Bakker
Some draw state bits are mutual exclusive. This patch will free some draw state bits by packing the mutual exclusive bits in a mask. Reviewed By: fclem Differential Revision: https://developer.blender.org/D7088
2020-03-11EEVEE: Replace octahedron reflection probe by cubemap arrayClément Foucault
We implement cubemap array support for EEVEE's lightcache reflection probes. This removes stretched texels and bottom hemisphere seams artifacts caused by the octahedral projection previously used. This introduce versioning code for the lightcache which will discard any lightcache version that is not compatible. Differential Revision: https://developer.blender.org/D7066
2020-03-11Workbench Simplification RefactorClément Foucault
This patch is (almost) a complete rewrite of workbench engine. The features remain unchanged but the code quality is greatly improved. Hair shading is brighter but also more correct. This also introduce the concept of `DRWShaderLibrary` to make a simple include system inside the GLSL files. Differential Revision: https://developer.blender.org/D7060
2020-03-11Eevee: internal support for arbitrary number of volume gridsBrecht Van Lommel
This has no user visible impact yet since smoke volumes only support a fixed set of attributes, but will become important with the new volume object. For GPU shader compilation, volume grids are now handled separately from image textures. They are somewhere between a vertex attribute and an image texture, basically an attribute that is stored as a texture. Differential Revision: https://developer.blender.org/D6952
2020-03-11Cleanup: spellingCampbell Barton
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-02-25DrawEngine: Clean upJeroen Bakker
Put DefaultFramebufferList and DefaultTextureList into an own header file. These structs were private, but also used by the window manager and gpu package. The previous implementation we needed to keep these structs in sync.
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2020-02-04Fix T73095: Edit Mode Overlay Linked MeshJeroen Bakker
When using duplicate linked meshes, objects that are not in edit-mode will be drawn as it is in edit mode, when another object with the same mesh is in edit mode. This will not be the case when one of the objects are influenced by modifiers. The change reflects more how it was done in Blender 2.79. The current change introduces a draw manager method that checks in detail who is responsible for the drawing (render engine or overlay engine). If the edit mesh is not the original or the object that is drawn doesn't draw the original mesh the object will be drawn by the render engine. Known Limitation of this patch is that the rendering outside edit mode doesn't reflect the latest changes until the user switches between object and edit mode. When there are no modifiers in use, the updating is done immediately. IMO this would be sufficient for blender 2.82, it also fixes parts of T72733. The updating of the surface batches requires more development and is post-poned for now. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D6737
2019-12-06Draw: Removal of MultiSample BuffersJeroen Bakker
Multisample buffers were used for smooth line drawing. As we now have an algorithm that doesn't need the multisample buffers we can remove them. The user preference for viewport multi_sampling is replaced by single toggle overlay `use_overlay_smooth_wire`. By default this setting is enabled as the new drawing is really quick (<1ms) and uses zero hacks. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6367
2019-12-02Overlay Engine: Make thickwires (linesize > 1.0) using the Wire AA passClément Foucault
This fixes the limitation of OSX not allowing glLineWidth with size > 1.0. This however only fix the viewport wire drawing.
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-09-27Cleanup: structs, cmake file listsCampbell Barton
2019-09-17DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-14Revert "DRW: Refactor to support draw call batching"Clément Foucault
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
2019-09-13DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-05Eevee: Shadow map refactorClément Foucault
Reviewed By: brecht Differential Revision: http://developer.blender.org/D5659
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-15DRW: New function DRW_culling_min_max_testmano-wii
For testing intersection with frustrum planes without having to transform all bound box vertices into global space.
2019-06-27DRW: Add DRW_STATE_BLEND_CUSTOMClément Foucault
This one enable dual source blending, enabling more fine tuned blending parameters inside the shader.
2019-06-26DRW: New function to retry stencil_mask valueAntonioya
This function is a workaround to use the stencil in grease pencil and reduce the number of clears. Reviewed by @fclem. Note: This function will be removed when draw manager supports stencil clearing by group.
2019-06-18Add a new function to recover the next shading group.Antonioya
After talking with @fclem, we decided to keep this as a workaround function waiting for the clearing operation to be available inside the shgroups.
2019-06-17DRW: Make stencil state clearer and distinctClément Foucault
Write and test states are now separate and need to be explicit. Also add asserts when trying to write without test enabled.
2019-06-17Cleanup: Fix comment typo errorAntonioya