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-14Curves: Split curve EEVEE/workbench functions from particle hairHans Goudey
The GPU evaluation for curves will have to change significantly from the current particle hair drawing code, due to its more general use cases and support for more curve types. To simplify that process and avoid introducing regressions for the rendering of hair particle systems, this commit splits drawing functions for the curves object and particle hair. The changes are just inlining of functions and copying code where necessary. Differential Revision: https://developer.blender.org/D14576
2022-04-08Fix: Build issue with MSVCRay Molenkamp
draw_common.h was included in a C++ file leading to the linker looking for the decorated name for `G_draw` which lead to a linker error. adding an extern "C" for C++ fixes the issue.
2022-03-26DRW: Port draw_common.c to use shared definition with GLSLClément Foucault
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
2022-01-24Cleanup: sort struct forward declarationsCampbell Barton
2021-12-08Cleanup: move public doc-strings into headers for 'draw'Campbell Barton
Ref T92709
2021-11-09Viewport: Remove different outline color for instancesHans Goudey
With instancing becoming more common with geometry nodes, instances are less of a separate thing and more of an essential part of evaluated data. Displaying them with a separate outline, while helpful in some cases, is not worth the lack of visibility or confusion about selected/active status. Information about the performance of the scene due to instancing is always available with the statistics like vertex count, etc. The problems were compounded by the fact that the instancing system is used to output geometry components that don't correspond to the object's original type. So this patch also fixes that problem. Fixes T92079, T81010 Ref T91310 Differential Revision: https://developer.blender.org/D13133
2021-09-24Hair Info Length AttributeJeroen Bakker
Goal is to add the length attribute to the Hair Info node, for better control over color gradients or similar along the hair. Reviewed By: #eevee_viewport, brecht Differential Revision: https://developer.blender.org/D10481
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-02-14Cleanup: spellingCampbell Barton
2020-12-16Cleanup: remove redundant struct declarationsCampbell Barton
2020-09-30Cleanup: sort struct declarationsCampbell Barton
2020-09-15Liquid Simulation Display Options (GSoC 2020)Sriharsha Kotcharlakot
All the changes made in the branch `soc-2020-fluid-tools` are included in this patch. **Major changes:** === Viewport Display === - //Raw voxel display// or //closest (nearest-neighbor)// interpolation for displaying the underlying voxel data of the simulation grids more clearly. - An option to display //gridlines// when the slicing method is //single//. ==== Grid Display ==== - Visualization for flags, pressure and level-set representation grids with a fixed color coding based on Manta GUI. ==== Vector Display ==== - //**M**arker **A**nd **C**ell// grid visualization options for vector grids like velocity or external forces. - Made vector display options available for external forces. ==== Coloring options for //gridlines// ==== - Range highlighting and cell filtering options for displaying the simulation grid data more precisely. - Color gridlines with flags. - Also, made slicing and interpolation options available for Volume Object. Reviewed By: JacquesLucke, sebbas Differential Revision: https://developer.blender.org/D8705
2020-09-11Use DrawManager for Image/UV EditorJeroen Bakker
This project moves the current UV/Image editor drawing to the draw manager. Why would we do this: **Performance**: Current implementation would draw each texel per time. Multiple texels could be drawn per pixel what would overwrite the previous result. You can notice this when working with large textures. Repeat image drawing made this visible by drawing for a small period of time and stop drawing the rest. Now the rendering is fast and all repeated images are drawn. **Alpha drawing**: Current implementation would draw directly in display space. Giving incorrect results when displaying alpha transparent images. This addresses {T52680}, {T74709}, {T79518} The image editor now can show emission only colors. See {D8234} for examples. **Current Limitations** Using images that are larger than supported by your GPU are resized (eg larger than 16000x16000 are resized to 8k). This leaves some blurring artifacts. It is a low priority to add support back of displaying individual pixels of huge images. There is a design task {T80113} with more detail. **Implementation overview** Introduced an Image Engine in the draw module. this engine is responsible for drawing the texture in the main area of the UV/Image editor. The overlay engine has a edit_uv overlay which is responsible to draw the UV's, shadows and overlays specifically for the UV Image editor. The background + checker pattern is drawn by the overlay_background. The patch will allow us to share overlays between the 3d viewport and UV/Image editor more easily. In most cases we just need to switch the `pos` with the `u` attribute in the vertex shader. The project can be activated in the user preferences as experimental features. In a later commit this will be reversed. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8234
2020-08-21GPUUniformBuf: Rename struct and change API a bitClément Foucault
This follows the GPU module naming of other buffers. We pass name to distinguish each GPUUniformBuf in debug mode. Also remove DRW_uniform_buffer interface.
2020-08-18Fix T79800: Split vertex size for grease pencilAntonio Vazquez
Differential Revision: https://developer.blender.org/D8607
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-07-30Cleanup: warningsCampbell Barton
2020-07-30Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRWClément Foucault
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-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-03-23UI: Theme options for checkerboard pattern colors and sizeMichael Soluyanov
This patch adds ability to set up colors and size of background (transparency) checkerboard pattern in viewport and 2d editors. No new backgrounds, only changing colors in existing ones. This is not the background of the viewport, it is a transparency checkerboard that is turned on only in render mode, when the transparency mode is on. And also in 2D-editors, (image, sequencer, etc). Reviewed By: Pablo Vazquez, Julian Eisel Differential Revision: https://developer.blender.org/D6791
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-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-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2019-12-17Cleanup: redundant struct declarationsCampbell Barton
2019-12-07UI: Custom Face Orientation ColorsHarley Acheson
Adds theme settings to allow change of front and back faces of the Face Orientation overlay Differential Revision: https://developer.blender.org/D6262 Reviewed by Jeroen Bakker
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-10-16Fix T68380 Skin modifier root not displayedClément Foucault
2019-08-263D View: show selected object axis when affect origins is enabledCampbell Barton
This replaces temporarily enabling draw-axis.
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-19View3D Grid: fix imperial grid drawingmano-wii
This is a step to finish the D4325 and fix the T61286. Currently the grid is highlighted in steps of 10 out of 10, which is wrong for the imperial units as seen in `buImperialLenDef`. The idea of the code is to pass the steps of the grid already dimensioned as a uniform. Another important thing to note is that subdivisions now only affect the grid without unity. This matches the 2.7x Blender versions. No performance loss (almost no gain too). Reviewers: fclem Subscribers: zlsa, rl.amorato Differential Revision: https://developer.blender.org/D4379
2019-05-30Fix T64510 Armature: Empty Not Visible as Bone custom shapeClément Foucault
2019-05-30Cleanup: use const argument, r_ prefix return argCampbell Barton
2019-05-303D View: Support light probe data clippingCampbell Barton
2019-05-27Cleanup: DRW: Move WorldClipPlanes to builtin uniformClément Foucault
2019-05-27Cleanup: EditMesh: Remove DRW_STATE_OFFSET_*Clément Foucault
2019-05-14DRW: Refactor: Use DRWCall to accumulate per instance attributesClément Foucault
This is a big change that cleanup a lot of confusing code. - The instancing/batching data buffer distribution in draw_instance_data.c. - The selection & drawing code in draw_manager_exec.c - Prety much every non-meshes object drawing (object_mode.c). Most of the changes are just renaming but there still a chance a typo might have sneek through. The Batching/Instancing Shading groups are replace by DRWCallBuffers. This is cleaner and conceptually more in line with what a DRWShadingGroup should be. There is still some little confusion in draw_common.c where some function takes shgroup as input and some don't.
2019-04-26Fix T62880 Severe FPS drop with multiple bone shapesClément Foucault
Fix instancing batches not being reused by custom bone shapes. Drawing thoses is now faster than 2.79 (40fps instead of 30fps)
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-16DRW: support clipping for armature bone axesCampbell Barton
Also minor changes to make empty axis match armature axis.
2019-03-16DRW: support clipping for envelope armature draw typeCampbell Barton
2019-03-16DRW: support clipping for relationship linesCampbell Barton
2019-03-05DRW: support clipping for bone vertsCampbell Barton
2019-02-27Armature: Force Transparent bone in wireframe display type/modeClément Foucault
This makes the bones transparent when the object or the viewport display type is Wireframe. This is in order to make things consistent. In object mode all bones are fully transparent to not create more visual noise if the scene is complex. Another small addition is that the Bounding Box draw mode now works as expected on armatures.
2019-02-27Cleanup: rename lamp -> lightCampbell Barton
2019-02-23Cleanup: quiet undeclared variable warningCampbell Barton
Also move view_ubo into G_draw.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.