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
2021-10-28Fix T92513: Cycles stereo pole merge not rotating along with cameraBrecht Van Lommel
2021-10-28Fix T92255: Cycles Christensen-Burley render errors with scaled objectsBrecht Van Lommel
2021-10-28Fix T92158: Cycles crash with Fast GI and area light MISBrecht Van Lommel
2021-10-27Cycles: Scrambling distance for the PMJ samplerWilliam Leeson
Adds scrambling distance to the PMJ sampler. This is based on the work by Mathieu Menuet in D12318 who created the original implementation for the Sobol sampler. Reviewed By: brecht Maniphest Tasks: T92181 Differential Revision: https://developer.blender.org/D12854
2021-10-27Cycles: Replace saturate with saturatefWilliam Leeson
saturate is depricated in favour of __saturatef this replaces saturate with __saturatef on CUDA by createing a saturatef function which replaces all instances of saturate and are hooked up to the correct function on all platforms. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13010
2021-10-26Fix Cycles runtime GPU kernel compilation after recent refactorBrecht Van Lommel
2021-10-26Cleanup: remove files that should not have been added in file renamesBrecht Van Lommel
2021-10-26Distance Scrambling for for Cycles X - Sobol versionWilliam Leeson
Cycles:Distance Scrambling for Cycles Sobol Sampler This option implements micro jittering an is based on the INRIA research paper [[ https://hal.inria.fr/hal-01325702/document | on micro jittering ]] and work by Lukas Stockner for implementing the scrambling distance. It works by controlling the correlation between pixels by either using a user supplied value or an adaptive algorithm to limit the maximum deviation of the sample values between pixels. This is a follow up of https://developer.blender.org/D12316 The PMJ version can be found here: https://developer.blender.org/D12511 Reviewed By: leesonw Differential Revision: https://developer.blender.org/D12318
2021-10-26Cycles: remove prefix from source code file namesBrecht Van Lommel
Remove prefix of filenames that is the same as the folder name. This used to help when #includes were using individual files, but now they are always relative to the cycles root directory and so the prefixes are redundant. For patches and branches, git merge and rebase should be able to detect the renames and move over code to the right file.
2021-10-26Cycles: changes to source code folders structureBrecht Van Lommel
* Split render/ into scene/ and session/. The scene/ folder now contains the scene and its nodes. The session/ folder contains the render session and associated data structures like drivers and render buffers. * Move top level kernel headers into new folders kernel/camera/, kernel/film/, kernel/light/, kernel/sample/, kernel/util/ * Move integrator related kernel headers into kernel/integrator/ * Move OSL shaders from kernel/shaders/ to kernel/osl/shaders/ For patches and branches, git merge and rebase should be able to detect the renames and move over code to the right file.
2021-10-26Cycles: add additive AO support through Fast GI settingsBrecht Van Lommel
Add a Fast GI Method, either Replace for the existing behavior, or Add to add ambient occlusion like the old world settings. This replaces the old Ambient Occlusion settings in the world properties.
2021-10-26Cycles: restore Denoising Depth pass, when enabling Denoising Data passesBrecht Van Lommel
This is still useful in some cases even if not used by OpenImageDenoise. In the future this may be replaced with a more generic system to control render passes and filtering, but for now this just does what it did before.
2021-10-26Cycles: change Position render pass to be not antialiasedBrecht Van Lommel
Similar to the Depth, for compositing the interpolated values between a far and near object can be non-sensical.
2021-10-22Fix Cycles HIP binaries always recompilingBrecht Van Lommel
2021-10-22Cleanup: refactor float/half conversions for clarityBrecht Van Lommel
2021-10-22Cycles: various fixes for HIP and compilation of HIP binariesSayak Biswas
* Additional structs added to the hipew loader for device props * Adds hipRTC functions to the loader for future usage * Enables CPU+GPU usage for HIP * Cleanup to the adaptive kernel compilation process * Fix for kernel compilation failures with HIP with latest master Ref T92393, D12958
2021-10-21Fix T92363: OptiX fails with ambient occlusion node, after recent changesBrecht Van Lommel
This triggered a compiler bug where it does not handle the sub.s16 PTX instruction. Instead refactor the code so we don't need to do uint16_t subtraction at all. Also update OptiX device to remove the AO pass direct callable. Thanks Patrick Mours for figuring this out.
2021-10-21Cycles: add shadow path compaction for GPU renderingBrecht Van Lommel
Similar to main path compaction that happens before adding work tiles, this compacts shadow paths before launching kernels that may add shadow paths. Only do it when more than 50% of space is wasted. It's not a clear win in all scenes, some are up to 1.5% slower. Likely caused by different order of scheduling kernels having an unpredictable performance impact. Still feels like compaction is just the right thing to avoid cases where a few shadow paths can hold up a lot of main paths. Differential Revision: https://developer.blender.org/D12944
2021-10-20Cleanup: remove unused codeBrecht Van Lommel
2021-10-20Cleanup: some renaming to better distinguish main and shadow pathsBrecht Van Lommel
2021-10-20Cycles: make ambient occlusion pass take into account transparency againBrecht Van Lommel
Taking advantage of the new decoupled main and shadow paths. For CPU we just store two nested structs in the integrator state, one for direct light shadows and one for AO. For the GPU we restrict the number of shade surface states to be executed based on available space in the shadow paths queue. This also helps improve performance in benchmark scenes with an AO pass, since it is no longer needed to use the shader raytracing kernel there, which has worse performance. Differential Revision: https://developer.blender.org/D12900
2021-10-20HIP device code cleanup and fix for high VRAM usageSayak Biswas
This patch cleans up code for HIP device and makes it more consistent with the CUDA code. It also fixes the issue with high VRAM usage on AMD cards using HIP allowing better performance and usage on cards like 6600XT. Added a check in intern/cycles/kernel/bvh/bvh_util.h to prevent compiler error with hipcc Reviewed By: brecht, leesonw Maniphest Tasks: T92124 Differential Revision: https://developer.blender.org/D12834
2021-10-19Cycles: bake transparent shadows for hairBrecht Van Lommel
These transparent shadows can be expansive to evaluate. Especially on the GPU they can lead to poor occupancy when only some pixels require many kernel launches to trace and evaluate many layers of transparency. Baked transparency allows tracing a single ray in many cases by accumulating the throughput directly in the intersection program without recording hits or evaluating shaders. Transparency is baked at curve vertices and interpolated, for most shaders this will look practically the same as actual shader evaluation. Fixes T91428, performance regression with spring demo file due to transparent hair, and makes it render significantly faster than Blender 2.93. Differential Revision: https://developer.blender.org/D12880
2021-10-19Cycles: avoid intermediate stack array for writing shadow intersectionsBrecht Van Lommel
Helps save one OptiX payload and is a bit more efficient. Differential Revision: https://developer.blender.org/D12909
2021-10-19Cycles: decouple shadow paths from main path on GPUBrecht Van Lommel
The motivation for this is twofold. It improves performance (5-10% on most benchmark scenes), and will help to bring back transparency support for the ambient occlusion pass. * Duplicate some members from the main path state in the shadow path state. * Add shadow paths incrementally to the array similar to what we do for the shadow catchers. * For the scheduling, allow running shade surface and shade volume kernels as long as there is enough space in the shadow paths array. If not, execute shadow kernels until it is empty. * Add IntegratorShadowState and ConstIntegratorShadowState typedefs that can be different between CPU and GPU. For GPU both main and shadow paths juse have an integer for SoA access. Bt with CPU it's a different pointer type so we get type safety checks in code shared between CPU and GPU. * For CPU, add a separate IntegratorShadowStateCPU struct embedded in IntegratorShadowState. * Update various functions to take the shadow state, and make SVM take either type of state using templates. Differential Revision: https://developer.blender.org/D12889
2021-10-19Cleanup: fix compiler warningsBrecht Van Lommel
2021-10-19Fix invalid principled diffuse in Cycles OSLSergey Sharybin
Need to initialize components for the full Diffuse BSDF. Steps to reproduce: - Default cube scene - Switch to Cycles renderer - Enable OSL backend - Start viewport render - Observe cube being much black Differential Revision: https://developer.blender.org/D12921
2021-10-19Cleanup: More readable Cycles OSL BSDF definitionSergey Sharybin
A Clang-Format configuration to make the closure definition block to be properly recognized as such. Also small wrapper macro to avoid comma in the actual definition code which was causing unwanted indentation of parameters definition. Requires Clang-Format 7 or newer. The version we ship in the libs is 12, so for recommended development setup it should all be good. Differential Revision: https://developer.blender.org/D12920
2021-10-19Cleanup: clang-formatCampbell Barton
2021-10-18Revert "Cycles: optimize volume stack copying for shadow catcher/compaction"Brecht Van Lommel
This reverts commit 3065d2609700d14100490a16c91152a6e71790e8. Causing crashes in the spring scene.
2021-10-18Cleanup: minor refactoring in preparation of main and shadow path decouplingBrecht Van Lommel
Ref D12889
2021-10-18Cycles: reduce GPU state memory a littleBrecht Van Lommel
* isect Ng is no longer needed for shadows, for main path needed for SSS only * Reduce rng_offset and queued_kernel to 16 bits Ref D12889
2021-10-18Cycles: optimize volume stack copying for shadow catcher/compactionBrecht Van Lommel
Only copy the number of items used instead of the max items. Ref D12889
2021-10-18Cleanup: consistently use uint32_t for path flagBrecht Van Lommel
2021-10-18Cycles: replace integrator state argument macrosBrecht Van Lommel
* Rename struct KernelGlobals to struct KernelGlobalsCPU * Add KernelGlobals, IntegratorState and ConstIntegratorState typedefs that every device can define in its own way. * Remove INTEGRATOR_STATE_ARGS and INTEGRATOR_STATE_PASS macros and replace with these new typedefs. * Add explicit state argument to INTEGRATOR_STATE and similar macros In preparation for decoupling main and shadow paths. Differential Revision: https://developer.blender.org/D12888
2021-10-15Cycles: Voronoi noise, fix uninitialised variableCharlie Jolly
Caused a debug crash in Windows MSVS. Reviewed By: brecht Differential Revision: https://developer.blender.org/D12873
2021-10-15Cleanup: refactor BVH2 shadow intersection for upcoming changesBrecht Van Lommel
2021-10-15Cleanup: refactor OptiX shadow intersection for upcoming changesBrecht Van Lommel
2021-10-15Cleanup: add utility functions for packing integersBrecht Van Lommel
2021-10-15Cleanup: refactor to make number of channels for shader evaluation variableBrecht Van Lommel
2021-10-15Fix T92128: Cycles CUDA wrong hair attributes, after recent changesBrecht Van Lommel
2021-10-14Cycles: Kernel address space changes for MSLMichael Jones
This is the first of a sequence of changes to support compiling Cycles kernels as MSL (Metal Shading Language) in preparation for a Metal GPU device implementation. MSL requires that all pointer types be declared with explicit address space attributes (device, thread, etc...). There is already precedent for this with Cycles' address space macros (ccl_global, ccl_private, etc...), therefore the first step of MSL-enablement is to apply these consistently. Line-for-line this represents the largest change required to enable MSL. Applying this change first will simplify future patches as well as offering the emergent benefit of enhanced descriptiveness. The vast majority of deltas in this patch fall into one of two cases: - Ensuring ccl_private is specified for thread-local pointer types - Ensuring ccl_global is specified for device-wide pointer types Additionally, the ccl_addr_space qualifier can be removed. Prior to Cycles X, ccl_addr_space was used as a context-dependent address space qualifier, but now it is either redundant (e.g. in struct typedefs), or can be replaced by ccl_global in the case of pointer types. Associated function variants (e.g. lcg_step_float_addrspace) are also redundant. In cases where address space qualifiers are chained with "const", this patch places the address space qualifier first. The rationale for this is that the choice of address space is likely to have the greater impact on runtime performance and overall architecture. The final part of this patch is the addition of a metal/compat.h header. This is partially complete and will be extended in future patches, paving the way for the full Metal implementation. Ref T92212 Reviewed By: brecht Maniphest Tasks: T92212 Differential Revision: https://developer.blender.org/D12864
2021-10-14Fix shadow catcher behind transparent object on GPUSergey Sharybin
The assumption about absent shadow path was wrong. The rest of the changes are to ensure shadow paths are finished prior to the split, so that they write to the proper passes. The issue was caught by running regression tests on OptiX. Differential Revision: https://developer.blender.org/D12857
2021-10-12Cleanup: spelling in commentsCampbell Barton
2021-10-11Cycles: improve SSS Fresnel and retro-reflection in Principled BSDFBrecht Van Lommel
For details see the "Extending the Disney BRDF to a BSDF with Integrated Subsurface Scattering" paper. We split the diffuse BSDF into a lambertian and retro-reflection component. The retro-reflection component is always handled as a BSDF, while the lambertian component can be replaced by a BSSRDF. For the BSSRDF case, we compute Fresnel separately at the entry and exit points, which may have different normals. As the scattering radius decreases this converges to the BSDF case. A downside is that this increases noise for subsurface scattering in the Principled BSDF, due to some samples going to the retro-reflection component. However the previous logic (also in 2.93) was simple wrong, using a non-sensical view direction vector at the exit point. We use an importance sampling weight estimate for the retro-reflection to try to better balance samples between the BSDF and BSSRDF. Differential Revision: https://developer.blender.org/D12801
2021-10-11Cycles: restore Christensen-Burley SSSBrecht Van Lommel
There is not enough time before the release to improve Random Walk to handle all cases this was used for, so restore it for now. Since there is no more path splitting in cycles-x, this can increase noise in non-flat areas for the sample number of samples, though fewer rays will be traced also. This is fundamentally a trade-off we made in the new design and why Random Walk is a better fit. However the importance resampling we do now does help to reduce noise. Differential Revision: https://developer.blender.org/D12800
2021-10-08Fix T91997: Cycles glass + SSS not rendering correctlyBrecht Van Lommel
2021-10-08Fix Cycles speed regression after dynamic volume stack changeSergey Sharybin
Only copy required part of volume stack instead of entire stack. Solves time regression introduced by D12759 and avoids need in implementing volume stack calculation to exactly match what the path tracing will do (as well as potentially makes scenes with a lot of volumes ans a tiny bit of deeply nested ones render faster). Still need to look into memory aspect of the regression, but that is for separate patch. Ref T92014 Maniphest Tasks: T92014 Differential Revision: https://developer.blender.org/D12790
2021-10-08Cleanup: spellingCampbell Barton
2021-10-07Cleanup: remove unnecessary data from LocalIntersectionBrecht Van Lommel