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 T102151: Output nodes don't work inside node groupsOmar Emara
Using output nodes inside node groups in compositor node trees doesn't work for the realtime compositor. Currently, the realtime compositor only considers top level output nodes. That means if a user edits a node group and adds an output node in the group, the output node outside of the node group will still be used, which breaks the temporary viewers workflow where users debug results inside a node group. This patch fixes that by first considering the output nodes in the active context, then consider the root context as a fallback. This is mostly consistent with the CPU compositor, but the realtime compositor allow viewing node group output nodes even if no output nodes exist at the top level context. Differential Revision: https://developer.blender.org/D16446 Reviewed By: Clement Foucault
2022-11-09Fix T102278: Compositor transforms apply locallyOmar Emara
When using two transformed compositor results, the transformation of one of them is apparently in the local space of the other, while it should be applied in the global space instead. In order to realize a compositor result on a certain operation domain, the domain of the result is projected on the operation domain and later realized. This is done by multiplying by the inverse of the operation domain. However, the order of multiplication was inverted, so the transformation was applied in the local space of the operation domain. This patch fixes that by inverting the order of multiplication in domain realization.
2022-11-04Realtime Compositor: Implement static cache managerOmar Emara
This patch introduces the concept of a Cached Resource that can be cached across compositor evaluations as well as used by multiple operations in the same evaluation. Additionally, this patch implements a new structure for the realtime compositor, the Static Cache Manager, that manages all the cached resources and deletes them when they are no longer needed. This improves responsiveness while adjusting compositor node trees and also conserves memory usage. Differential Revision: https://developer.blender.org/D16357 Reviewed By: Clement Foucault
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-02Realtime Compositor: Make vectors four dimensionalOmar Emara
Currently, the realtime compositor treat vector types as 3D vectors, which is true for most operations. However, some operations deal with vector types as 4D vectors that encode two 2D vectors or one 3D vector with the last component ignored. So this patch expands vector types to include a fourth component that is only sometimes used. Since we already stored vectors in RGBA textures, the necessary changes are straightforward and are mostly concerned with adjusting the Result class. Differential Revision: https://developer.blender.org/D16359 Reviewed By: Clement Foucault
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-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-19Cleanup: CMake include pathsCampbell Barton
Remove redundant separators & redundant references to parent paths.
2022-10-13Realtime Compositor: Keep interpolation in Scale nodeOmar Emara
Currently, the scale node always changes the interpolation of its result to bilinear. This was done because the scale node does not have an interpolation option, unlike the Transform node, so a default of bilinear was assumed. This turned out to be problematic, because in the pixelation use cases, a nearest interpolation is typically preferred by the user. This patch changes the default interpolation of input nodes to bilinear, makes the scale node keep the interpolation of the input it receives, and makes the pixelate node changes the interpolation to nearest. In effect, for non-pixelation use cases, the default bilinear interpolation will be used, and for pixelation use cases, the nearest interpolation will be used unless explicitly specified using a node that sets the interpolation.
2022-10-11Cleanup: Add missing include for parallel reductionOmar Emara
The parallel reduction file didn't include its own header, which can yield "no previous declaration" warnings. This patch includes the header to fix the warning.
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-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-09-25Cleanup: replace static_casts with functional casts for numeric typesCampbell Barton
2022-09-25Cleanup: use 'u' prefixed integer types for brevity & cast styleCampbell Barton
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
2022-09-15Cleanup: use doxy sections, remove outdated commentCampbell Barton
2022-09-15Cleanup: spelling in comments, comment blocksCampbell Barton
2022-09-09Realtime Compositor: Allow inputs to skip realizationOmar Emara
This patch adds support for the skip realization option of the input descriptor. Inputs that request skip realization will not be realized on the operation domain of the operation and will not contribute to its computation, and consequently, they can't be a domain input. An example is the bokeh input of the Bokeh Blur node, which is actually a resource that is decoupled from the rest of the inputs and should not affect or be affected by their domain. Differential Revision: https://developer.blender.org/D15767 Reviewed By: Clement Foucault
2022-09-07Cleanup: sort cmake file listsCampbell Barton
2022-09-06Cleanup: spelling in comments, formatting, move comments into headersCampbell Barton
2022-08-31Cleanup: Use const for node data in compositorHans Goudey
Push the const usage a bit further for compositor nodes, so that they are more explicit about not modifying original nodes from the editor. Differential Revision: https://developer.blender.org/D15822
2022-08-31Nodes: move NodeTreeRef functionality into node runtime dataJacques Lucke
The purpose of `NodeTreeRef` was to speed up various queries on a read-only `bNodeTree`. Not that we have runtime data in nodes and sockets, we can also store the result of some queries there. This has some benefits: * No need for a read-only separate node tree data structure which increased complexity. * Makes it easier to reuse cached queries in more parts of Blender that can benefit from it. A downside is that we loose some type safety that we got by having different types for input and output sockets, as well as internal and non-internal links. This patch also refactors `DerivedNodeTree` so that it does not use `NodeTreeRef` anymore, but uses `bNodeTree` directly instead. To provide a convenient API (that is also close to what `NodeTreeRef` has), a new approach is implemented: `bNodeTree`, `bNode`, `bNodeSocket` and `bNodeLink` now have C++ methods declared in `DNA_node_types.h` which are implemented in `BKE_node_runtime.hh`. To make this work, `makesdna` now skips c++ sections when parsing dna header files. No user visible changes are expected. Differential Revision: https://developer.blender.org/D15491
2022-08-23Cleanup: match names between functions & declarationsCampbell Barton
2022-08-19Fix: Crash when realtime compositor node is unlinkedOmar Emara
The realtime compositor crashes when some nodes are unlinked. This happens for GPU material nodes if it was compiled into its own shader operation. Since it is unlinked, the shader operation will have no inputs, a case that the current code didn't consider. This patch fixes this by skipping code generation for inputs if no inputs exist for the shader operation.
2022-08-12Cleanup: repeated words in commentsCampbell Barton
2022-08-11Cleanup: spelling in commentsCampbell Barton
2022-08-10Realtime Compositor: Fix clang tidy warningsOmar Emara
Fix a number of warnings reported by Clang Tidy in the realtime compositor's code. Differential Revision: https://developer.blender.org/D15654 Reviewed By: Clement Foucault
2022-08-10Realtime Compositor: Add stub unsupported nodesOmar Emara
This patch adds a stub implementation for all unsupported nodes. The inputs are passed through to the outputs where it make sense, while other outputs will be allocated a single zero value. This seems to be preferred by users as opposed to stopping execution and displaying an error message. Differential Revision: https://developer.blender.org/D15464 Reviewed By: Clement Foucault
2022-08-10Realtime Compositor: Add evaluator and engineOmar Emara
This patch adds the core realtime compositor evaluator as well as a compositor draw engine powered by the evaluator that operates in the viewport. The realtime compositor is a new GPU accelerated compositor that will be used to power the viewport compositor imminently as well as the existing compositor in the future. This patch only adds the evaluator and engine as an experimental feature, the implementation of the nodes themselves will be committed separately. See T99210. Differential Revision: https://developer.blender.org/D15206 Reviewed By: Clement Foucault