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-09-29Cleanup: cmake indentationCampbell Barton
2022-09-28Cleanup: spelling in commentsCampbell Barton
Also add missing task ID.
2022-09-28Cleanup: formatCampbell Barton
2022-09-27Cycles: Add optional per-kernel performance statisticsNikita Sirgienko
When verbose level 4 is enabled, Blender prints kernel performance data for Cycles on GPU backends (except Metal that doesn't use debug_enqueue_* methods) for groups of kernels. These changes introduce a new CYCLES_DEBUG_PER_KERNEL_PERFORMANCE environment variable to allow getting timings for each kernels separately and not grouped with others. This is done by adding explicit synchronization after each kernel execution. Differential Revision: https://developer.blender.org/D15971
2022-09-27Cleanup: Unused variable warning with path guiding turned offHans Goudey
2022-09-27Fix: OpenPGL related build error on windowsRay Molenkamp
Debug and Release libs are different libs on Windows and will give linker errors when you try to mix and match them. This changes retrieves both libs and fills the OPENPGL_LIBRARIES variable appropriately resolving the linker error.
2022-09-27Cycles: Tweak inlining policy on MetalMichael Jones
This patch optimises the Metal inlining policy. It gives a small speedup (2-3% on M1 Max) with no notable compilation slowdown vs what is already in master. Previously noted compilation slowdowns (as reported in T100102) were caused by forcing inlining for `ccl_device`, but we get better rendering perf by relying on compiler heuristics in these cases. Reviewed By: brecht Differential Revision: https://developer.blender.org/D16081
2022-09-27Cycles: Disable binary archives on macOS < 13.0Michael Jones
An bug with binary archives was fixed in macOS 13.0 which stops some spurious kernel recompilations. In older macOS versions, falling back on the system shader cache will prevent recompilations in most instances (this is the same behaviour as in Blender 3.1.x and 3.2.x). Reviewed By: brecht Differential Revision: https://developer.blender.org/D16082
2022-09-27Cycles: add Path Guiding on CPU through Intel OpenPGLSebastian Herhoz
This adds path guiding features into Cycles by integrating Intel's Open Path Guiding Library. It can be enabled in the Sampling > Path Guiding panel in the render properties. This feature helps reduce noise in scenes where finding a path to light is difficult for regular path tracing. The current implementation supports guiding directional sampling decisions on surfaces, when the material contains a least one diffuse component, and in volumes with isotropic and anisotropic Henyey-Greenstein phase functions. On surfaces, the guided sampling decision is proportional to the product of the incident radiance and the normal-oriented cosine lobe and in volumes it is proportional to the product of the incident radiance and the phase function. The incident radiance field of a scene is learned and updated during rendering after each per-frame rendering iteration/progression. At the moment, path guiding is only supported by the CPU backend. Support for GPU backends will be added in future versions of OpenPGL. Ref T92571 Differential Revision: https://developer.blender.org/D15286
2022-09-27Cycles: BSDF eval refactor to remove separate reflection/refraction methodsBrecht Van Lommel
Simplifies code overall to do it inside the eval function, most of the BSDFs already compute the dot product. The refactoring in bsdf_principled_hair_eval() was needed to avoid a HIP compiler bug. Cause is unclear, just changing the implementation enough is meant to sidestep it. Ref T92571, D15286
2022-09-27Cycles: BSDF changes in preparation of path guidingSebastian Herhoz
* Return roughness and IOR for BSDF sampling * Add functions to query IOR and label for given BSDF * Default IOR to 1.0 instead of 0.0 for BSDFs that don't use it * Ensure pdf >= 0.0 in case of numerical precision issues Ref T92571, D15286
2022-09-26Fix T101354: Cycles crash with baking and adaptive samplingBrecht Van Lommel
2022-09-26Cycles: increase min-supported driver version for Intel GPUsXavier Hallade
Windows drivers 101.3430 fix an important GUI-related crash and it's best to prevent users from running into it. Linux drivers weren't affected but still had relevant gpu binary compatibility fixes, so it makes sense to keep the min-supported version aligned across OSes.
2022-09-26Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
2022-09-23Mesh: Move edge crease out of MEdgeHans Goudey
This is very similar to D14077. There are two differences though. First is that vertex creases are already stored in a separate layer, and second is that we can now completely remove use of `Mesh.cd_flag`, since that information is now inherent to whether the layers exist. There are two functional differences here: * Operators are used to add and remove layers instead of a property. * The "crease" attribute can be created and removed by geometry nodes. The second change should make various geometry nodes slightly faster, since the "crease" attribute was always processed before. Creases are now interpolated generically in the CustomData API too, which should help maintain the values across edits better. Meshes get an `edge_creases` RNA property like the existing vertex property, to provide more efficient access to the data in Cycles. One test failure is expected, where different rounding between float the old char storage means that 5 additional points are scattered in a geometry nodes test. Differential Revision: https://developer.blender.org/D15927
2022-09-23Cleanup: use lowercase function calls & macros in for CMakeCampbell Barton
This is already the case for most CMake usage. Although some find modules are an exception to this, as they were originally maintained externally they use some different conventions. Also corrected bad indentation in: intern/cycles/CMakeLists.txt
2022-09-22Cycles: Cleanup in oneAPI math includes and definitionsWerner, Stefan
Now explicitly including math.h first before #defining funcitons. This avoids undefined behavior and improves compatibility with different SYCL compilers and backends.
2022-09-21Add oneAPI to the 'cycles_device' command line argument help textAlaska
Differential Revision: https://developer.blender.org/D16027
2022-09-20Cycles: don't allow negative BSDF weightsBrecht Van Lommel
This doesn't work with path guiding, and likely other features.
2022-09-18Cycles: sync changes from standalone repositoryBrecht Van Lommel
* Windows build fixes * Workaround for Hydra + OpenColorIO link issue * Bump version
2022-09-17Cleanup: spelling, punctuation & repeated words in commentsCampbell Barton
2022-09-15Fix T101065: wrong denoising depth after ray precision improvementsBrecht Van Lommel
2022-09-14Fix T101025: Cycles motion blur crash with changing point cloud sizeHans Goudey
Caused by 410a6efb747f188da30c which didn't properly use the smallest size between the Cycles and Blender point clouds.
2022-09-13Fix compilation error on Windows after recent changeSergey Sharybin
2022-09-13Cycles: Make OSL implementation independent from SVMPatrick Mours
Cleans up the file structure to be more similar to that of the SVM and also makes it possible to build kernels with OSL support, but without having to include SVM support. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15949
2022-09-13Fix oneAPI compilation on modern Linux and CentOS 7 librariesSergey Sharybin
2022-09-13Cycles: Include reason the oneAPI library could not be loadedSergey Sharybin
Additionally, just stick to a pure error stating. Such messages are aimed for developers and it is rather implied that oneAPI rendering will be disabled.
2022-09-13Cleanup: spelling in commentsCampbell Barton
2022-09-10Cleanup: cycles OSL compiler warningsBrecht Van Lommel
2022-09-10Cleanup: format, spellingCampbell Barton
2022-09-09Cycles: Generate OSL closures using macros and a template filePatrick Mours
This has the advantage of being able to use information about the existing OSL closures in various places without code duplication. In addition, the setup code for all closures was moved to standalone functions to avoid usage of virtual function calls in preparation for GPU support. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15917
2022-09-09Cycles: Remove separate OSL attribute map and instead always use SVM ↵Patrick Mours
attribute map The SVM attribute map is always generated and uses a simple linear search to lookup by an opaque ID, so can reuse that for OSL as well and simply use the attribute name hash as ID instead of generating a unique value separately. This works for both object and geometry attributes since the SVM attribute map already stores both. Simplifies code somewhat and reduces memory usage slightly. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15918
2022-09-08Fix T100833: Cycles UDIM baking broken after recent changesBrecht Van Lommel
2022-09-08Fix Cycles wrong MIS logic in shade_light kernel after recent changesBrecht Van Lommel
Though end result was still correct. Thanks to Alaska for spotting this.
2022-09-07Mikktspace: Optimized port to C++Lukas Stockner
This commit is a big overhaul to the Mikktspace module, which is used to compute tangents. I'm not calling it a rewrite since it's the result of a lot of iterations on the original code, but pretty much everything is reworked somehow. Overall goal was to a) make it faster and b) make it maintainable. Notable changes: - Since the callbacks for requesting geometry data were a big bottleneck before, I've ported it to C++ and made it header-only, templating on the data source. That way, the compiler generates code specific to the caller, which allows it to inline the data source and specialize for some cases (e.g. subd vs. non-subd in Cycles). - The one input parameter, an optional angle threshold, was not used anywhere. Turns out that removing it allows for considerable algorithmic simplification, removing a lot of the complexity in the later stages. Therefore, I've just removed the option in the new code. - The code computes several outputs, but only one (the tangent itself) is ever used in Blender. Therefore, I've removed the others to simplify the code. They could easily be brought back if needed, none of the algorithmic simplifications are conflicting with them. - The original code had fallback paths for many steps in case temporary memory allocation fails, but that never actually gets used anyways since malloc() doesn't really ever return NULL in practise, so I removed them. - In general, I've restructured A LOT of the code to make the algorithms clearer and make use of some C++ features (vectors, std::array, booleans, classes), though there's still some of cleanup that could be done. - Parallelized duplicate detection, neighbor detection, triangle tangent computation, degenerate triangle handling and tangent space accumulation. - Replaced several algorithms with faster equivalents: Duplicate detection uses a (concurrent) hash set now, neighbor detection uses Radixsort and splits vertices by index pairs etc. As for results, the exact speedup depends on the scene of course, but let's consider the file from T97378: - Blender 3.1 (before D14675): 6.07sec - Blender 3.2 (with D14675): 4.62sec - rBf0a36599007d (last nightly build): 4.42sec - With this commit: 0.90sec This speedup will mostly be noticed at the start of Cycles renders and, even more importantly, in Eevee when doing something that changes the geometry (e.g. animating) on a model using normal maps. Differential Revision: https://developer.blender.org/D15589
2022-09-06Fix T100824: Cycles GPU render broken on macOS 13 Beta and Apple siliconBrecht Van Lommel
The recent revert of Apple silicon inlining changes to avoid long compile times worked on macOS 12, but in macOS 13 Beta it results in render errors. This may be a compiler bug and perhaps get fixed in time, but try to be on the safe side and ensure Blender 3.3.0 works regardless. This brings part of the inlining back, which brings improved performance but also longer compiler times again. Compile time is around 2min now, where the previous full inlining was about 5-7min. Patch by Michael Jones. Differential Revision: https://developer.blender.org/D15897
2022-09-06Fix T100845: wrong Cycles OptiX runtime compilation include pathJosh Whelchel
Causing OptiX kernel build errors on Arch Linux. Differential Revision: https://developer.blender.org/D15891
2022-09-06Merge branch 'blender-v3.3-release'Nikita Sirgienko
2022-09-06Cycles: Fix crashes in oneAPI backend for scenes not fitting in dGPU memoryNikita Sirgienko
Differential Revision: https://developer.blender.org/D15889
2022-09-06Cleanup: spelling in comments, formatting, move comments into headersCampbell Barton
2022-09-05Mesh: Remove redundant custom data pointersHans Goudey
For copy-on-write, we want to share attribute arrays between meshes where possible. Mutable pointers like `Mesh.mvert` make that difficult by making ownership vague. They also make code more complex by adding redundancy. The simplest solution is just removing them and retrieving layers from `CustomData` as needed. Similar changes have already been applied to curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of the pointers generally makes code more obvious and more reusable. Mesh data is now accessed with a C++ API (`Mesh::edges()` or `Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`). The CoW changes this commit makes possible are described in T95845 and T95842, and started in D14139 and D14140. The change also simplifies the ongoing mesh struct-of-array refactors from T95965. **RNA/Python Access Performance** Theoretically, accessing mesh elements with the RNA API may become slower, since the layer needs to be found on every random access. However, overhead is already high enough that this doesn't make a noticible differenc, and performance is actually improved in some cases. Random access can be up to 10% faster, but other situations might be a bit slower. Generally using `foreach_get/set` are the best way to improve performance. See the differential revision for more discussion about Python performance. Cycles has been updated to use raw pointers and the internal Blender mesh types, mostly because there is no sense in having this overhead when it's already compiled with Blender. In my tests this roughly halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million face grid). Differential Revision: https://developer.blender.org/D15488
2022-09-05Merge branch 'blender-v3.3-release'Brecht Van Lommel
2022-09-05Fix T100814: Cycles wrong area light parametric texture coordinatesBrecht Van Lommel
The fix from cefd6140f322 was for light intersection, but light sampling also needs it. Differential Revision: https://developer.blender.org/D15879
2022-09-05Fix Cycles not rendering hair without radius attributesBrecht Van Lommel
This was fixed in 8159e0a but accidentally reverted as part of 18b703d
2022-09-02Cleanup: fix compiler warningBrecht Van Lommel
2022-09-02Cycles: enable adaptive sampling for Sobol-BurleyNathan Vegdahl
This uses the same sample classification approach as used for PMJ, because it turns out to also work equally well with Sobol-Burley. This also implements a fallback (random classification) that should work "okay" for other samplers, though there are no other samplers at the moment. Differential Revision: https://developer.blender.org/D15845
2022-09-02Fix Cycles scrambling distance incorrectly showing as enabled for Sobol-BurleyBrecht Van Lommel
Contributed by Alaska. Differential Revision: https://developer.blender.org/D15849
2022-09-02Cleanup: split surface/displacement/volume shader eval into separate filesBrecht Van Lommel
2022-09-02Cleanup: remove some unnecessary kernel feature definesBrecht Van Lommel
That are either unused or aren't useful for testing anymore without a megakernel.
2022-09-02Cleanup: refactoring of kernel film function names and organizationBrecht Van Lommel