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-11-10Fix: GPU: Set the last enum in ENUM_OPERATORSMiguel Pozo
2022-11-09Fix T102306: buildtime shader compilation option fails under WaylandCampbell Barton
libdecor (for window decorations) was crashing on exit with the shader builder, avoid the crash by calling the "background" system creation function which doesn't initialize window management under Wayland.
2022-11-02Realtime Compositor: Move shaders to compositor moduleOmar Emara
This patch moves the GLSL shaders and their infos to the compositor module as decided by the EEVEE & Viewport module. This is a non functional change. Differential Revision: https://developer.blender.org/D16360 Reviewed By: Clement Foucault
2022-11-02Cleanup: formatCampbell Barton
2022-11-01Fix compilation error on Windows.Jeroen Bakker
Missing return statement in recent commit. Code is disabled by default, so might not have been noticed.
2022-11-01Cleanup: spelling in commentsCampbell Barton
2022-10-31GPU: Add placeholder for Vulkan backend.Jeroen Bakker
This patch adds a placeholder for the vulkan backend. When activated (`WITH_VULKAN_BACKEND=On` and `--gpu-backend vulkan`) it might open a blender screen, but nothing should be visible as none of the functions are implemented or otherwise crash on a nullptr. This is expected as this is just a placeholder. The goal is to add shader compilation +validation to this backend as one of the next steps so we can validate changes to existing shaders on OpenGL, Metal and Vulkan at the same time. Reviewed By: fclem Differential Revision: https://developer.blender.org/D16338
2022-10-30DRW: Manager: Add possibility to record a framebuffer change inside a passClément Foucault
This is a convenience when one needs to often change the current framebuffer and avoid the overhead of creating many Main/Simple passes.
2022-10-24GPencil: Use indexed rendering instead of instancesClément Foucault
This allows using instancing in other ways, like resources indexing.
2022-10-21GPU: remove unused member from FrameBufferGermano Cavalcante
Accidentally added in rB2510bd3a5f35d14f5e0e098c79a776916d273223
2022-10-21GPU: Don't exit after first GPUBackend.Jeroen Bakker
2022-10-21GPU: Fix Metal GLSL compilation errors due to recent changes.Jeroen Bakker
vec.st is legacy OpenGL and should not be used.
2022-10-21Fix: Bokeh blur node flips its bokeh inputOmar Emara
The bokeh blur node flipped its bokeh input due to the conceptual difference between the search window space and the weights texture space. This patches fixes that by inverting the weights texture to match the search window. The variable size option actually flips the bokeh input for the CPU compositor. It is unclear if this is expected, so we deviate from that behavior for now.
2022-10-20UI: Icon number indicator for data-blocksDalai Felinto
Adds the possibility of having a little number on top of icons. At the moment this is used for: * Outliner * Node Editor bread-crumb * Node Group node header For the outliner there is almost no functional change. It is mostly a refactor to handle the indicators as part of the icon shader instead of the outliner draw code. (note that this was already recently changed in a5d3b648e3e2). The difference is that now we use rounded border rectangle instead of circles, and we can go up to 999 elements. So for the outliner this shows the number of collapsed elements of a certain type (e.g., mesh objects inside a collapsed collection). For the node editors is being used to show the use count for the data-block. This is important for the node editor, so users know whether the node-group they are editing (or are about to edit) is used elsewhere. This is particularly important when the Node Options are hidden, which is the default for node groups appended from the asset libraries. --- Note: This can be easily enabled for ID templates which can then be part of T84669. It just need to call UI_but_icon_indicator_number_set in the function template_add_button_search_menu. --- Special thanks Clément Foucault for the help figuring out the shader, Julian Eisel for the help navigating the UI code, and Pablo Vazquez for the collaboration in this design solution. For images showing the result check the Differential Revision. Differential Revision: https://developer.blender.org/D16284
2022-10-20Realtime Compositor: Implement normalize nodeOmar Emara
This patch implements the normalize node for the realtime compositor. Differential Revision: https://developer.blender.org/D16279 Reviewed By: Clement Foucault
2022-10-20GL: Make restart index consistent on older implementationClément Foucault
This prevents weird quirks where the implementation might skip the ushort max index even in non-indexed draws.
2022-10-20Realtime Compositor: Implement Tone Map nodeOmar Emara
This patch implements the tone map node for the realtime compositor based on the two papers: Reinhard, Erik, et al. "Photographic tone reproduction for digital images." Proceedings of the 29th annual conference on Computer graphics and interactive techniques. 2002. Reinhard, Erik, and Kate Devlin. "Dynamic range reduction inspired by photoreceptor physiology." IEEE transactions on visualization and computer graphics 11.1 (2005): 13-24. The original implementation should be revisited later due to apparent incompatibilities with the reference papers, which makes the operation less useful. Differential Revision: https://developer.blender.org/D16306 Reviewed By: Clement Foucault
2022-10-20GPU: Avoid undocumented/fragile dependency on shader enumerator orderJulian Eisel
Previously this was using `GPU_SHADER_TEXT` as default value indicating an "unset" state. This wasn't documented in the definition (and so D16284 added a new enumerator that broke this). Plus code was assuming this enumerator would always have the value 0 without specifying this in the definition either. In this case it's easy to not rely on the enum value at all, and just use `std::optional` to add a "unset" state. Differential Revision: https://developer.blender.org/D16303
2022-10-20Fix incorrect shader state after shader interface creationSergey Sharybin
Use store-current-and-restore-previous OpenGL program in the OpenGL Shader Interface. This is a better fix for the initial error, which additionally solves interface artifacts when opening non-default startyp files on macOS with AMD GPU.
2022-10-19Blender: Add command line argument to switch gpu backends.Jeroen Bakker
Add command line argument to switch gpu backend. Add `--gpu-backend` option to override the gpu backend selected by Blender. Values for this option that will be available in releases for now are: * opengl: Force blender to select OpenGL backend. During development and depending on compile options additional values can exist: * metal: Force Blender to select Metal backend. When this option isn't provided the internal logic for GPU backend selection will be used. Note that this is at the time of writing the same as always selecting the opengl backend. Reviewed By: fclem, brecht, MichaelPW Differential Revision: https://developer.blender.org/D16297
2022-10-19GL: Fix incorrect shader state after shader interface creationClément Foucault
The interface needs to bind the shaders for some parameter setup. This program change wasn't reflected in the GPUContext. This was then conflicting with the next shader bind if the next shader was the same as the shader bound before the interface creation. Setting the state to the correct shader ensures a rebind if needed. Fix T101792 New hair curves do not render properly first time in EEVEE with motion blur enabled
2022-10-19Cleanup: formatCampbell Barton
2022-10-19Cleanup: spelling in commentsCampbell Barton
2022-10-19License headers: add missing license identifiersCampbell Barton
2022-10-18Metal: MTLBatch and MTLDrawList implementation.Jason Fielder
MTLBatch and MTLDrawList implementation enables use of Metal Viewport for UI and Workbench. Includes Vertex descriptor caching and SSBO Vertex Fetch mode draw call submission. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D16101
2022-10-11Realtime Compositor: Implement variable size bokeh blurOmar Emara
This patch implements the variable size blur option in the Bokeh Blur node. The implementation is different from the CPU one in that it also takes the Bounding Box input into account, which is ignored for some reason for the CPU. Additionally, this implementation does not do the optimization where the search radius is limited relative to the maximum value in the size texture. That's because the cost of computing the maximum is not worth it for most use cases. The reference implementation does three unexpected things that are replicated here nonetheless. First, the center bokeh weight is always ignored and assumed to be 1. Second the size of the center pixel is taken into account. Third, a unidimensional distance is used instead of a 2D euclidean one. Those need to be considered independently. Differential Revision: https://developer.blender.org/D16185 Reviewed By: Clement Foucault
2022-10-11Realtime Compositor: Implement parallel reductionOmar Emara
This patch implements generic parallel reduction for the realtime compositor and implements the Levels operation as an example. This patch also introduces the notion of a "Compositor Algorithm", which is a reusable operation that can be used to construct other operations. Differential Revision: https://developer.blender.org/D16184 Reviewed By: Clement Foucault
2022-10-10Cleanup: spelling in commentsCampbell Barton
2022-10-08Attribute Node: support accessing attributes of View Layer and Scene.Alexander Gavrilov
The attribute node already allows accessing attributes associated with objects and meshes, which allows changing the behavior of the same material between different objects or instances. The same idea can be extended to an even more global level of layers and scenes. Currently view layers provide an option to replace all materials with a different one. However, since the same material will be applied to all objects in the layer, varying the behavior between layers while preserving distinct materials requires duplicating objects. Providing access to properties of layers and scenes via the attribute node enables making materials with built-in switches or settings that can be controlled globally at the view layer level. This is probably most useful for complex NPR shading and compositing. Like with objects, the node can also access built-in scene properties, like render resolution or FOV of the active camera. Lookup is also attempted in World, similar to how the Object mode checks the Mesh datablock. In Cycles this mode is implemented by replacing the attribute node with the attribute value during sync, allowing constant folding to take the values into account. This means however that materials that use this feature have to be re-synced upon any changes to scene, world or camera. The Eevee version uses a new uniform buffer containing a sorted array mapping name hashes to values, with binary search lookup. The array is limited to 512 entries, which is effectively limitless even considering it is shared by all materials in the scene; it is also just 16KB of memory so no point trying to optimize further. The buffer has to be rebuilt when new attributes are detected in a material, so the draw engine keeps a table of recently seen attribute names to minimize the chance of extra rebuilds mid-draw. Differential Revision: https://developer.blender.org/D15941
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-10-07DRW: Move clipping planes to their own UBOClément Foucault
This is part of the effor to simplify the View struct in order to implement multiview rendering.
2022-10-06Cleanup: spelling in code commentsCampbell Barton
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-10-03Cleanup: fix source comment/documentation typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D16071
2022-10-03Cleanup: sort cmake file listsCampbell Barton
2022-10-03Cleanup: quiet undeclared function warningCampbell Barton
2022-10-02GPUTexture: Add GPU_texture_create_single_layer_viewClément Foucault
This allows the creation of texture arrays from 1D/2D/Cube texture. This is useful when the shader expect a texture array but the original texture isn't.
2022-09-30Attribute Node: refactor lookup to remove duplication between engines.Alexander Gavrilov
Currently lookup of Object and Instancer attributes is completely duplicated between Cycles, Eevee and Eevee Next. This is bad design, so this patch aims to deduplicate it by introducing a common API in blenkernel. In case of Cycles this requires certain hacks, but according to Brecht it is planned to be rewritten later for more direct access to internal Blender data anyway. Differential Revision: https://developer.blender.org/D16117
2022-09-30Cleanup: use function style casts for C++Campbell Barton
2022-09-29Viewport: Remove unnecassary assertJoseph Eagar
2022-09-29Sculpt: Rewrite PBVH drawJoseph Eagar
Rewrite PBVH draw to allocate attributes into individual VBOs. The old system tried to create a single VBO that could feed every open viewport. This required uploading every color and UV attribute to the viewport whether needed or not, often exceeding the VBO limit. This new system creates one VBO per attribute. Each attribute layout is given its own GPU batch which is cached inside the owning PBVH node. Notes: * This is a full C++ rewrite. The old code is still there; ripping it out can happen later. * PBVH nodes now have a collection of batches, PBVHBatches, that keeps track of all the batches inside the node. * Batches are built exclusively from a list of attributes. * Each attribute has its own VBO. * Overlays, workbench and EEVEE can all have different attribute layouts, each of which will get its own batch. Reviewed by: Clement Foucault Differential Revision: https://developer.blender.org/D15428 Ref D15428
2022-09-28Geometry Nodes: viewport previewJacques Lucke
This adds support for showing geometry passed to the Viewer in the 3d viewport (instead of just in the spreadsheet). The "viewer geometry" bypasses the group output. So it is not necessary to change the final output of the node group to be able to see the intermediate geometry. **Activation and deactivation of a viewer node** * A viewer node is activated by clicking on it. * Ctrl+shift+click on any node/socket connects it to the viewer and makes it active. * Ctrl+shift+click in empty space deactivates the active viewer. * When the active viewer is not visible anymore (e.g. another object is selected, or the current node group is exit), it is deactivated. * Clicking on the icon in the header of the Viewer node toggles whether its active or not. **Pinning** * The spreadsheet still allows pinning the active viewer as before. When pinned, the spreadsheet still references the viewer node even when it becomes inactive. * The viewport does not support pinning at the moment. It always shows the active viewer. **Attribute** * When a field is linked to the second input of the viewer node it is displayed as an overlay in the viewport. * When possible the correct domain for the attribute is determined automatically. This does not work in all cases. It falls back to the face corner domain on meshes and the point domain on curves. When necessary, the domain can be picked manually. * The spreadsheet now only shows the "Viewer" column for the domain that is selected in the Viewer node. * Instance attributes are visualized as a constant color per instance. **Viewport Options** * The attribute overlay opacity can be controlled with the "Viewer Node" setting in the overlays popover. * A viewport can be configured not to show intermediate viewer-geometry by disabling the "Viewer Node" option in the "View" menu. **Implementation Details** * The "spreadsheet context path" was generalized to a "viewer path" that is used in more places now. * The viewer node itself determines the attribute domain, evaluates the field and stores the result in a `.viewer` attribute. * A new "viewer attribute' overlay displays the data from the `.viewer` attribute. * The ground truth for the active viewer node is stored in the workspace now. Node editors, spreadsheets and viewports retrieve the active viewer from there unless they are pinned. * The depsgraph object iterator has a new "viewer path" setting. When set, the viewed geometry of the corresponding object is part of the iterator instead of the final evaluated geometry. * To support the instance attribute overlay `DupliObject` was extended to contain the information necessary for drawing the overlay. * The ctrl+shift+click operator has been refactored so that it can make existing links to viewers active again. * The auto-domain-detection in the Viewer node works by checking the "preferred domain" for every field input. If there is not exactly one preferred domain, the fallback is used. Known limitations: * Loose edges of meshes don't have the attribute overlay. This could be added separately if necessary. * Some attributes are hard to visualize as a color directly. For example, the values might have to be normalized or some should be drawn as arrays. For now, we encourage users to build node groups that generate appropriate viewer-geometry. We might include some of that functionality in future versions. Support for displaying attribute values as text in the viewport is planned as well. * There seems to be an issue with the attribute overlay for pointclouds on nvidia gpus, to be investigated. Differential Revision: https://developer.blender.org/D15954
2022-09-28Cleanup: spelling in commentsCampbell Barton
Also add missing task ID.
2022-09-27Cleanup: formatCampbell Barton
2022-09-27GPU: Fix crash when rendering with compositor using CLIClément Foucault
The backend gets used before it is initialized again. This is just a workaround for now as production schedule needs ir.
2022-09-27GPU: Revert part of D16017 that was accidentally commitedClément Foucault
This code slipped through the final review step surely caused by a faulty merge. Fixes T101372 Regression: World shader setup crashes Blender in rendered view Regression introduced by rB697b447c2069bbbbaa9929aab0ea1f66ef8bf4d0
2022-09-26Cleanup: format, ensure trailing newlinesCampbell Barton
2022-09-26Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Use function style casts in C++ headers & source.
2022-09-26GPU: Disable SSBO support from commandline.Jeroen Bakker
In heavy scenes containing many hairs/curves and volumetrics using SSBO can overwrite the binding information of the volumetric resolve shader. This has been detected during project Heist and is only reproducable on NVIDIA platform. This patch adds an debug option to disable SSBOs from the command line to replace the --debug-gpu-force-workarounds that has been used as a workaround on the render farm. Reason is that force workarounds will also add other limitations as well (number of texture binds for example)
2022-09-25Cleanup: remove redundant parenthesis (especially with macros)Campbell Barton