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-06-20Cleanup: renaming and consistency for kernel dataBrecht Van Lommel
* Rename "texture" to "data array". This has not used textures for a long time, there are just global memory arrays now. (On old CUDA GPUs there was a cache for textures but not global memory, so we used to put all data in textures.) * For CUDA and HIP, put globals in KernelParams struct like other devices. * Drop __ prefix for data array names, no possibility for naming conflict now that these are in a struct.
2022-06-17Cleanup: add verbose logging category names instead of numbersBrecht Van Lommel
And use them more consistently than before.
2022-06-17Cleanup: replace uint4 by AttributeMap structBrecht Van Lommel
2022-06-07Cycles: Useful Metal backend debug & profiling functionalityMichael Jones
This patch adds some useful debugging & profiling env vars to the Metal backend: - `CYCLES_METAL_PROFILING`: output a per-kernel timing report at the end of the render - `CYCLES_METAL_DEBUG`: enable per-dispatch tracing (very verbose) - `CYCLES_DEBUG_METAL_CAPTURE_KERNEL`: enable programatic .gputrace capture for a specified kernel index Here's an example of the timing report with `CYCLES_METAL_PROFILING` enabled: ``` --------------------------------------------------------------------------------------------------- Kernel name Total threads Dispatches Avg. T/D Time Time% --------------------------------------------------------------------------------------------------- integrator_init_from_camera 657,407,232 161 4,083,274 0.24s 0.51% integrator_intersect_closest 1,629,288,440 681 2,392,494 15.18s 32.12% integrator_intersect_shadow 751,652,291 470 1,599,260 5.80s 12.28% integrator_shade_background 304,612,074 263 1,158,220 1.16s 2.45% integrator_shade_surface 1,159,764,041 676 1,715,627 20.57s 43.52% integrator_shade_shadow 598,885,847 418 1,432,741 1.27s 2.69% integrator_queued_paths_array 2,969,650,130 805 3,689,006 0.35s 0.74% integrator_queued_shadow_paths_array 593,936,619 379 1,567,115 0.14s 0.29% integrator_terminated_paths_array 22,205,417 155 143,260 0.05s 0.10% integrator_sorted_paths_array 2,517,140,043 676 3,723,579 1.65s 3.50% integrator_compact_paths_array 648,912,748 155 4,186,533 0.03s 0.07% integrator_compact_states 20,872,687 155 134,662 0.14s 0.29% integrator_terminated_shadow_paths_array 374,100,675 438 854,111 0.16s 0.33% integrator_compact_shadow_paths_array 503,768,657 438 1,150,156 0.05s 0.10% integrator_compact_shadow_states 37,664,941 202 186,460 0.23s 0.50% integrator_reset 25,165,824 6 4,194,304 0.06s 0.12% film_convert_combined_half_rgba 3,110,400 6 518,400 0.00s 0.01% prefix_sum 676 676 1 0.19s 0.40% --------------------------------------------------------------------------------------------------- 6,760 47.27s 100.00% --------------------------------------------------------------------------------------------------- ``` Reviewed By: brecht Differential Revision: https://developer.blender.org/D15044
2022-06-03Merge remote-tracking branch 'origin/blender-v3.2-release'Dalai Felinto
2022-06-03Fix T98570: Cycles AOVs not working in background shaderBrecht Van Lommel
Must include the AOV writing feature in background shader evaluation. Differential Revision: https://developer.blender.org/D15114
2022-05-31Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-31Fix Cycles MNEE not working for MetalBrecht Van Lommel
Move MNEE to own kernel, separate from shader ray-tracing. This does introduce the limitation that a shader can't use both MNEE and AO/bevel, but that seems like the better trade-off for now. We can experiment with bigger kernel organization changes later. Differential Revision: https://developer.blender.org/D15070
2022-05-24Cleanup: make formatJacques Lucke
2022-05-23Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-23Fix T98036: Cycles blackbody inaccurate for low temperature and wide gamutBrecht Van Lommel
Regenerate blackbody RGB curve fit to not clamp values, and extend down to 800K since it does now change below 965K. Note that as before, blackbody is only defined in the range 800K to 12000K and has a fixed value outside of that. But within that range there should be no more unnecessary gamut clamping.
2022-05-23Cycles: Add half precision float support for volumes with NanoVDBPatrick Mours
This patch makes it possible to change the precision with which to store volume data in the NanoVDB data structure (as float, half, or using variable bit quantization) via the previously unused precision field in the volume data block. It makes it possible to further reduce memory usage during rendering, at a slight cost to the visual detail of a volume. Differential Revision: https://developer.blender.org/D10023
2022-05-23Merge branch 'blender-v3.2-release'Sergey Sharybin
2022-05-23Fix missing 64bit casts when calculating Cycles render buffer offsetSergey Sharybin
Found those missing casts while looking into a crash report made in the Blender Chat. Was unable to reproduce the crash, but the casts should totally be there to avoid integer overflow.
2022-05-18Cleanup: formatCampbell Barton
2022-05-17Merge branch 'blender-v3.2-release'Richard Antalik
2022-05-17Fix T97921: Cycles MNEE issue with light path nodesOlivier Maury
Ensure the correct total/diffuse/transmission depth is set when evaluating shaders for MNEE, consistent with regular light shader evaluation. Differential Revision: https://developer.blender.org/D14902
2022-05-17Merge branch 'blender-v3.2-release'Bastien Montagne
2022-05-17Fix T98163: Cycles OSL rendering normal maps differentlyBrecht Van Lommel
Match SVM and ensure valid reflection when setting up BSDFs.
2022-05-17Merge branch 'blender-v3.2-release'Antonio Vazquez
2022-05-17Cleanup: fix compiler warningBrecht Van Lommel
2022-05-17Cleanup: formatCampbell Barton
2022-05-16Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-16Fix T97867: Cycles MNEE blocky artefacts for rough refractive interfacesOlivier Maury
Made tangent frame consistent across the surface regardless of the sample, which was not the case with the previous algorithm. Previously, a tangent frame would stay consistent for the same sample throughout the walk, but not from sample to sample for the same triangle. This actually resulted in code simplification. Also includes additional fixes: * Fixed an important bug that manifested itself with multiple lights in the scene, where caustics had abnormally low amplitude: The final light pdf did not include the light distribution pdf. * Removed unnecessary orthonormal basis generation function, using cycles' native one instead. * Increased solver max iteration back to 64: It turns out we sometimes need these extra iterations in cases where projection back to the surface takes many steps. The effective solver iteration count, the most expensive part, is actually much less than the raw iteration count. Differential Revision: https://developer.blender.org/D14931
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-05-12UDIM: Add support for packing inside .blend filesJesse Yurkovich
This completes support for tiled texture packing on the Blender / Cycles side of things. Most of these changes fall into one of three categories: - Updating Image handling code to pack/unpack tiled and multi-view images - Updating Cycles to handle tiled textures through BlenderImageLoader - Updating OSL to properly handle textures with multiple slots Differential Revision: https://developer.blender.org/D14395
2022-05-11Enable inlining on Apple Silicon. Use new process-wide ShaderCache in order ↵Michael Jones
to safely re-enable binary archives This patch is the same as D14763, but with a fix for unit test failures caused by ShaderCache fetch logic not working in the non-MetalRT case: ``` diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm index ad268ae7057..6aa1a56056e 100644 --- a/intern/cycles/device/metal/kernel.mm +++ b/intern/cycles/device/metal/kernel.mm @@ -203,9 +203,12 @@ bool kernel_has_intersection(DeviceKernel device_kernel) /* metalrt options */ request.pipeline->use_metalrt = device->use_metalrt; - request.pipeline->metalrt_hair = device->kernel_features & KERNEL_FEATURE_HAIR; - request.pipeline->metalrt_hair_thick = device->kernel_features & KERNEL_FEATURE_HAIR_THICK; - request.pipeline->metalrt_pointcloud = device->kernel_features & KERNEL_FEATURE_POINTCLOUD; + request.pipeline->metalrt_hair = device->use_metalrt && + (device->kernel_features & KERNEL_FEATURE_HAIR); + request.pipeline->metalrt_hair_thick = device->use_metalrt && + (device->kernel_features & KERNEL_FEATURE_HAIR_THICK); + request.pipeline->metalrt_pointcloud = device->use_metalrt && + (device->kernel_features & KERNEL_FEATURE_POINTCLOUD); { thread_scoped_lock lock(cache_mutex); @@ -225,9 +228,9 @@ bool kernel_has_intersection(DeviceKernel device_kernel) /* metalrt options */ bool use_metalrt = device->use_metalrt; - bool metalrt_hair = device->kernel_features & KERNEL_FEATURE_HAIR; - bool metalrt_hair_thick = device->kernel_features & KERNEL_FEATURE_HAIR_THICK; - bool metalrt_pointcloud = device->kernel_features & KERNEL_FEATURE_POINTCLOUD; + bool metalrt_hair = use_metalrt && (device->kernel_features & KERNEL_FEATURE_HAIR); + bool metalrt_hair_thick = use_metalrt && (device->kernel_features & KERNEL_FEATURE_HAIR_THICK); + bool metalrt_pointcloud = use_metalrt && (device->kernel_features & KERNEL_FEATURE_POINTCLOUD); MetalKernelPipeline *best_pipeline = nullptr; for (auto &pipeline : collection) { ``` Reviewed By: brecht Differential Revision: https://developer.blender.org/D14923
2022-05-11Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-11Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-10Fix T97966: Cycles shadow terminator offset wrong for scaled object instancesMikhail Matrosov
Differential Revision: https://developer.blender.org/D14893
2022-05-10Fix T97056: Cycles MNEE not working with glass and pure refraction BSDFsOlivier Maury
Differential Revision: https://developer.blender.org/D14901
2022-05-06Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-06Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-05Fix T95308, T93913: Cycles mist pass wrong with SSS shaderBrecht Van Lommel
It was wrongly writing passes twice, for both the surface entry and exit points. We can skip code for filtering closures, emission and holdout also, as these do nothing with only a subsurface diffuse closure present.
2022-05-05Cleanup: clang formatBrecht Van Lommel
2022-05-05Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-05Fix T93246: Cycles wrong volume shading after transparent surfaceBrecht Van Lommel
The Russian roulette probability was not taken into account for volumes in all cases. It should not be left out from the SD_HAS_ONLY_VOLUME case.
2022-05-05Cleanup: formatCampbell Barton
2022-05-05Merge branch 'blender-v3.2-release'Germano Cavalcante
2022-05-04Fix T96718: Cycles invalid pixels when using bump normal for light emissionBrecht Van Lommel
A shader node setup accidentally used the bump normal as emission. Bump mapping nodes are excluded from light shader evaluation to reduce kernel size and register pressure, but in that case should write zero instead of leaving memory uninitialized. Thanks to Lukas for helping identify the cause.
2022-05-04Nodes: Add general Combine/Separate Color nodesHallam Roberts
Inspired by D12936 and D12929, this patch adds general purpose "Combine Color" and "Separate Color" nodes to Geometry, Compositor, Shader and Texture nodes. - Within Geometry Nodes, it replaces the existing "Combine RGB" and "Separate RGB" nodes. - Within Compositor Nodes, it replaces the existing "Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA" nodes. - Within Texture Nodes, it replaces the existing "Combine RGBA" and "Separate RGBA" nodes. - Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and "Separate RGB/HSV" nodes. Python addons have not been updated to the new nodes yet. **New shader code** In node_color.h, color.h and gpu_shader_material_color_util.glsl, missing methods hsl_to_rgb and rgb_to_hsl are added by directly converting existing C code. They always produce the same result. **Old code** As requested by T96219, old nodes still exist but are not displayed in the add menu. This means Python scripts can still create them as usual. Otherwise, versioning replaces the old nodes with the new nodes when opening .blend files. Differential Revision: https://developer.blender.org/D14034
2022-05-04Cycles: mark all CUDA 11.x versions as supportedBrecht Van Lommel
All released versions appear to work fine. Also slightly change wording.
2022-05-03CMake: fix error building when CUDA_NVCC_EXECUTABLE is missingCampbell Barton
2022-04-30Fix T96576: Light leaking when using normal maps with Multiscatter GGXLukas Stockner
The Multiscatter GGX code was missing the same-side checks for incoming and outgoing directions w.r.t. to shading and geometry normal. Should not be needed for the Glass variant since it intentionally has both reflection and transmission.
2022-04-29Cleanup: fix various Cycles build warnings with non-default optionsBrecht Van Lommel
* Float/double promotion warnings were mainly meant for avoiding slow operatiosn in the kernel. Limit it to that to avoid hard to fix warnings in Hydra. * Const warnings in Hydra iterators. * Unused variable warnings when building without glog. * Wrong camera enum comparisons in assert. * PASS_UNUSED is not a pass type, only for pass offsets.
2022-04-28Fix T94467: Cycles baking of normal pass slower than before cycles-xBrecht Van Lommel
2022-04-28Ensure BSDF evals and pdfs are zero on invalid samplesSebastian Herholz
Currently, the `eval` and `pdf` are not explicitly set to zero when a BSDF sample is invalid (e.g., below the upper hemisphere), when calling `bsdf_sample` or `bsdf_eval`. It is assumed that `eval` and `pdf` are set to zero before these functions are called, which can cause problems if not. This patch fixes this potential problem by explicitly setting `eval` and `pdf` to zero when the sampled direction is invalid. I also added a sanity check if `eval` and `pdf` are valid (i.e., >= 0.f). The check is activated when build in debug mode and with the `WITH_CYCLES_DEBUG` set to `ON`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D14776
2022-04-28Fix: Sky models can return negative valuesSebastian Herholz
When converting from XYZ to RGB it can happen, in some sky models, that the resulting RGB values are negative. Atm, this is not considered and the returned values for the sky model can be negative. This patch clamps the returned RGB values to be `= 0.f` Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D14777
2022-04-28Fix T97056: Cycles MNEE caustics treated as direct instead of indirect lightChristophe Hery
This fixes wrong render passs and bounce limits. Differential Revision: https://developer.blender.org/D14737
2022-04-28Revert "Cycles: Enable inlining on Apple Silicon for 1.1x speedup"Brecht Van Lommel
This reverts commit b82de02e7ce857e20b842a074c0068b146a9fd79. It is causing crashes in various regression tests. Ref D14763