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
path: root/intern
AgeCommit message (Collapse)Author
2021-12-10Fix T92036: `Magic Texture` in Volumetric World Shaders render differently ↵William Leeson
with the CPU and GPU When rendering volume surfaces in unbounded worlds the volume stepping can produce large values. If used with a magic texture node the values can results in a Inf float which when used in a sin or cos produces a NaN. To fix this the input values are mapped into the periodic range of the sin and cos functions (-2*PI 2*PI) this stops the possibility of a Inf occurring and thus the NaN. It also improves the accuracy and smoothness of the result due to loss of precision when large values are summed with smaller ones effectively removing the parts of the smaller number (i.e. those in the -2PI to 2PI range) that result in variation of the output of sin and cos. Reviewed By: brecht Maniphest Tasks: T92036 Differential Revision: https://developer.blender.org/D12821
2021-12-09Fix Cycles wrong adaptive sampling render when using sample offsetAndrii
Sample offset was not accounted for in the adaptive sampling code and caused issues, like immediately applied adaptive filtering, with non-zero values. Differential Revision: https://developer.blender.org/D13510
2021-12-09Cycles: support merging images rendered with adaptive samplingAndrii
This patch adds support for merging images rendered with adaptive sampling to the merge operator (which is currently only exposed in the Python API). To do this an sample count buffer is created for each render layer from the sample count pass if it exists, or from the metadata otherwise. This is then used for averaging passes. Differential Revision: https://developer.blender.org/D13457
2021-12-09Cleanup: use more modern C++ in Cycles merge operatorAndrii
Use structured binding and for-each loop, remove reduntant type casts, use find_if instead of loop. Differential Revision: https://developer.blender.org/D13456
2021-12-09Fix T93498: Cycles fast GI add method affected by bounces settingsBrecht Van Lommel
This is only for the replace method.
2021-12-09Fix T93890: Cycles error with shadow catcher + OptiX denoise without passesBrecht Van Lommel
2021-12-09Fix T93874: Cycles crash with fast GI approximationBrecht Van Lommel
2021-12-09Cleanup: spelling in commentsCampbell Barton
2021-12-09Cycles-X: Add hysteresis to resolution divider algorithmAlaska
Adds hysteresis to the resolution divider algorithm to avoid having the resolution bounce around when on the boundary of two resolutions. Reviewed By: brecht, leesonw Differential Revision: https://developer.blender.org/D12385
2021-12-08Cycles: Fix OS version warningsMichael Jones
This patch suppresses OS version warnings and hides currently unsupported Metal GPUs when enumerating devices. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13506
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-12-08Cleanup: Missing braces in array declarationAaron Carlisle
2021-12-08Cleanup: clang-formatAaron Carlisle
2021-12-08Cleanup: spelling in commentsCampbell Barton
2021-12-08Cycles: Fix Metal BVH crash caused by missing `WITH_METAL` defineMichael Jones
Reviewed By: brecht Differential Revision: https://developer.blender.org/D13505
2021-12-07Revert "Fix T93350: Cycles renders shows black during rendering huge ↵Brecht Van Lommel
resolutions" This reverts commit 5e37f70307bdacedd0f7da65f8b385bc1426f21d. It is leading to freezing of the entire desktop for a few seconds when stopping 3D viewport rendering on my Linux / NVIDIA system.
2021-12-07Cycles: add Fisheye Lens Polynomial camera modelHåkan Ardö
This allows real world cameras to be modeled by specifying the coordinates of a 4th degree polynomial that relates a pixels distance (in mm) from the optical center on the sensor to the angle (in radians) of the world ray that is projected onto that pixel. This is available as part of the panoramic lens type, however it can also be used to model lens distortions in projective cameras for example. Differential Revision: https://developer.blender.org/D12691
2021-12-07Cleanup: fix compiler warningBrecht Van Lommel
2021-12-07Fix T93350: Cycles renders shows black during rendering huge resolutionsSergey Sharybin
The root of the issue is caused by Cycles ignoring OpenGL limitation on the maximum resolution of textures: Cycles was allocating texture of the final render resolution. It was exceeding limitation on certain GPUs and driver. The idea is simple: use multiple textures for the display, each of which will fit into OpenGL limitations. There is some code which allows the display driver to know when to start the new tile. Also added some code to allow force graphics interop to be re-created. The latter one ended up not used in the final version of the patch, but it might be helpful for other drivers implementation. The tile size is limited to 8K now as it is the safest size for textures on many GPUs and OpenGL drivers. Differential Revision: https://developer.blender.org/D13385
2021-12-07Fix T93418: Cycles shadow terminator Geometry Offset artifacts with translucencyMikhail Matrosov
Differential Revision: https://developer.blender.org/D13468
2021-12-07Cycles: Reintroduce device-only memory handling that got lost in Cycles X mergePatrick Mours
Somehow only a part of rBf4f8b6dde32b0438e0b97a6d8ebeb89802987127 ended up in Cycles X, causing the issue that commit fixed, "OPTIX_ERROR_INVALID_VALUE" when the system is out of memory, to show up again. This adds the missing changes to fix that problem. Maniphest Tasks: T93620 Differential Revision: https://developer.blender.org/D13488
2021-12-07Cycles: add Metal device type to `device_type_for_description`Sybren A. Stüvel
Add a `DEVICE_METAL` case to the enum-value-to-string mapping function.
2021-12-07Cycles: fix build on non-Apple systemsSybren A. Stüvel
Skip compiling `metal.mm` unless `WITH_CYCLES_DEVICE_METAL` is enabled.
2021-12-07Cycles: Metal host-side codeMichael Jones
This patch adds the Metal host-side code: - Add all core host-side Metal backend files (device_impl, queue, etc) - Add MetalRT BVH setup files - Integrate with Cycles device enumeration code - Revive `path_source_replace_includes` in util/path (required for MSL compilation) This patch also includes a couple of small kernel-side fixes: - Add an implementation of `lgammaf` for Metal [Nemes, Gergő (2010), "New asymptotic expansion for the Gamma function", Archiv der Mathematik](https://users.renyi.hu/~gergonemes/) - include "work_stealing.h" inside the Metal context class because it accesses state now Ref T92212 Reviewed By: brecht Maniphest Tasks: T92212 Differential Revision: https://developer.blender.org/D13423
2021-12-06cmake: fix linking with WITH_X11_XF86VMODE and bfdAurelien Jarno
Fix typos in the variables of the Xxf86vm libray to fix link failure with bfd. These variables are defined in platform_unix.cmake. Reviewed By: zeddb Differential Revision: https://developer.blender.org/D12911
2021-12-02Merge branch 'blender-v3.0-release'Brecht Van Lommel
2021-12-02Fix T93560: crash with image paint undo and cycles preview renderBrecht Van Lommel
Cycles preview rendering could free the image buffers being used by drawing in another thread due to a race condition. This race condition was unlikely before, but now that preview renders are started right before we draw the image in the image editor or load it as a texture in the 3D viewport, it's likely to happen. As we are close to release this is too risky to fix properly, just avoid freeing the cache for preview renders instead and accept increased memory usage in some cases.
2021-12-02Fix T92308: OptiX denoising fails with high resolutionsPatrick Mours
The OptiX denoiser does have an upper limit as to how many pixels it can denoise at once, so this changes the OptiX denoising process to use tiles for high resolution images. The OptiX SDK does have an utility function for this purpose, so changes are minor, adjusting the configured tile size and including enough overlap. Maniphest Tasks: T92308 Differential Revision: https://developer.blender.org/D13436
2021-12-01Cleanup: compiler warningBrecht Van Lommel
2021-12-01Cycles: fix bugs in point and spot light multiple importance samplingSebastian Herholz
* Spot lights are now handled as disks aligned with the direction of the spotlight instead of view aligned disks. * Point light is now handled separately from the spot light, to fix a case where multiple lights are intersected in a row. Before the origin of the ray was the previously intersected light and not the origin of the initial ray traced from the last surface/volume interaction. This makes both strategies in multiple importance sampling converge to the same result. It changes the render results in some scenes, for example the junkshop scene where there are large point lights overlapping scene geometry and each other. Differential Revision: https://developer.blender.org/D13233
2021-12-01Fix some shortcut keys not working on macOS with Japanese inputYuki Hashimoto
Differential Revision: https://developer.blender.org/D13414
2021-11-30Cleanup: clang-format, trailing spaceCampbell Barton
2021-11-30Cleanup: remove blank lines in comment blocksCampbell Barton
2021-11-30Cleanup: capitalize NOTE tagCampbell Barton
2021-11-30Cleanup: spelling in comments & stringsCampbell Barton
2021-11-29Fix Cycles OptiX doing a bit too much work for almost opaque curve shadowsBrecht Van Lommel
Found in D13353, likely has no significant impact in performance.
2021-11-29Fix debug build error after recent Cycles kernel argument changesBrecht Van Lommel
2021-11-29Cycles: MetalRT support (kernel side)Michael Jones
This patch adds MetalRT support to Cycles kernel code. It is mostly additive in nature or confined to Metal-specific code, however there are a few areas where this interacts with other code: - MetalRT closely follows the Optix implementation, and in some cases (notably handling of transforms) it makes sense to extend Optix special-casing to MetalRT. For these generalisations we now have `__KERNEL_GPU_RAYTRACING__` instead of `__KERNEL_OPTIX__`. - MetalRT doesn't support primitive offsetting (as with `primitiveIndexOffset` in Optix), so we define and populate a new kernel texture, `__object_prim_offset`, containing per-object primitive / curve-segment offsets. This is referenced and applied in MetalRT intersection handlers. - Two new BVH layout enum values have been added: `BVH_LAYOUT_METAL` and `BVH_LAYOUT_MULTI_METAL_EMBREE` for XPU mode). Some host-side enum case handling has been updated where it is trivial to do so. Ref T92212 Reviewed By: brecht Maniphest Tasks: T92212 Differential Revision: https://developer.blender.org/D13353
2021-11-29Cycles: Metal readiness: Specify DeviceQueue::enqueue arg typesMichael Jones
This patch adds new arg-type parameters to `DeviceQueue::enqueue` and its overrides. This is in preparation for the Metal backend which needs this information for correct argument encoding. Ref T92212 Reviewed By: brecht Maniphest Tasks: T92212 Differential Revision: https://developer.blender.org/D13357
2021-11-28Cleanup: typos in comments.Kévin Dietrich
2021-11-26Cycles: Fix film convert address space mismatch on MetalMichael Jones
This patch fixes an address space mismatch in the film convert kernels on Metal. The `film_get_pass_pixel_...` functions take a `ccl_private` result pointer, but the film convert kernels pass a `ccl_global` memory pointer. Specialising the pass-fetch functions with templates results in compilation errors on Visual Studio, so instead this patch just adds an intermediate local on Metal. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13350
2021-11-25Merge branch 'blender-v3.0-release'Brecht Van Lommel
2021-11-25Cycles: expose direct light sampling option in Debug panel, tweak panel layoutBrecht Van Lommel
2021-11-25Fix build error with experimental features after recent release cycle bumpBrecht Van Lommel
Hair, pointcloud and simulation datablock types should be disabled in the beta cycles already like other experimental features.
2021-11-25Merge remote-tracking branch 'origin/blender-v3.0-release'Sergey Sharybin
2021-11-25Fix T93155: Approximate shadow catcher displayed wrong on CPU and GPUSergey Sharybin
Was happening during rendering, causing visual artifacts when doing CPU+GPU rendering, and giving different in-progress results on different devices. The root of the issue comes to the fact that math used in the approximate shadow catcher calculation might have resulted in negative alpha channel, and negative values for display are handled differently on CPU and GPU. Such difference in handling is caused by an approximate conversion used on the CPU for the performance reasons. This change makes it so no negative alpha is generated by the approximate shadow catcher. Not sure if we need some explicit clamping somewhere to deal with possible negative values coming from somewhere else. The shadow catcher cornell box tests are to be updated for the new code, but the new result seems to be more accurate. Differential Revision: https://developer.blender.org/D13354
2021-11-25Merge branch 'blender-v3.0-release'Sergey Sharybin
2021-11-25Fix black Cycles result when cancelling tiled rendering with shadow catcherSergey Sharybin
Noticed when was looking into T93155. Steps to reproduce: - Open the .blend file from the report - Hit F12 to start rendering - After some tiles were rendered hit Esc The issue is caused by "sticky" cancel reported via Progress. This means that once user hit Esc all further requests for cancel state will return truth, which was preventing OIDN denoiser from completing the denoising task. Now only allow stopping the denoiser when interactive rendering requests a very fast stopping. Aiming the fix for 3.0 branch. Differential Revision: https://developer.blender.org/D13352
2021-11-25Merge branch 'blender-v3.0-release' to bring in D13042:William Leeson
Fix performance decrease with Scrambling Distance on
2021-11-25Fix performance decrease with Scrambling Distance onAlaska
With the current code in master, scrambling distance is enabled on non-hardware accelerated ray tracing devices see a measurable performance decrease when compared scrambling distance on vs off. From testing, this performance decrease comes from the large tile sizes scheduled in `tile.cpp`. This patch attempts to address the performance decrease by using different algorithms to calculate the tile size for devices with hardware accelerated ray traversal and devices without. Large tile sizes for hardware accelerated devices and small tile sizes for others. Most of this code is based on proposals from @brecht and @leesonw Reviewed By: brecht, leesonw Differential Revision: https://developer.blender.org/D13042