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
2019-12-12Cycles: perform clamping per light contribution instead of whole pathLukas Stockner
With upcoming light group passes, for them to sum up correctly to the combined pass the clamping must be more fine grained. This also has the advantage that if one light is particularly noisy, it does not diminish the contribution from other lights which do not need as much clamping. Clamp values on existing scenes will need to be tweaked to get similar results, there is no automatic conversion possible which would give the same results as before. Implemented by Lukas, with tweaks by Brecht. Part of D4837
2019-08-26Cycles: code to optionally zero initialize some structs in the kernelBrecht Van Lommel
This will be used by Optix to help the compiler figure out scoping. It is not used by other devices currently, but worth testing if it helps there too. Ref D5363
2019-08-26Cycles: GPU code generation optimizations for direct lightingPatrick Mours
Use a single loop to iterate over all lights, reducing divergence and amount of code to generate. Moving ray intersection calls out of conditionals will also help the Optix compiler. Ref D5363
2019-08-26Cycles: inline more functions on the GPUPatrick Mours
This makes little difference for CUDA and OpenCL, but will be helpful for Optix.
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2018-11-09Cycles: Cleanup, spacing after preprocessorSergey Sharybin
It is supposed to be two spaces before comment stating which if else/endif statements corresponds to. Was mainly violated in the header guards.
2018-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-02-22Cycles: add Russian roulette termination for volume multiple scattering.Brecht Van Lommel
This mainly helps with dense volumes, rendering can be 30% faster with little noise increase in such scenes.
2017-09-28Cycles: reduce subsurface stack memory usage.Brecht Van Lommel
This is done by storing only a subset of PathRadiance, and by storing direct light immediately in the main PathRadiance. Saves about 10% of CUDA stack memory, and simplifies subsurface indirect ray code.
2017-09-20Cycles: slightly improve BSDF sample stratification for path tracing.Brecht Van Lommel
Similar to what we did for area lights previously, this should help preserve stratification when using multiple BSDFs in theory. Improvements are not easily noticeable in practice though, because the number of BSDFs is usually low. Still nice to eliminate one sampling dimension.
2017-09-20Code cleanup: remove hack to avoid seeing transparent objects in noise.Brecht Van Lommel
Previously the Sobol pattern suffered from some correlation issues that made the outline of objects like a smoke domain visible. This helps simplify the code and also makes some other optimizations possible.
2017-09-13Code cleanup: deduplicate some branched and split kernel code.Brecht Van Lommel
Benchmarks peformance on GTX 1080 and RX 480 on Linux is the same for bmw27, classroom, pabellon, and about 2% faster on fishy_cat and koro.
2017-09-12Fix rare firefly in volume equiangular sampling when sampling short distance.Brecht Van Lommel
2017-09-12Cycles: improve sample stratification on area lights for path tracing.Brecht Van Lommel
Previously we used a 1D sequence to select a light, and another 2D sequence to sample a point on the light. For multiple lights this meant each light would get a random subset of a 2D stratified sequence, which is not guaranteed to be stratified anymore. Now we use only a 2D sequence, split into segments along the X axis, one for each light. The samples that fall within a segment then each are a stratified sequence, at least in the limit. So for example for two lights, we split up the unit square into two segments [0,0.5[ x [0,1[ and [0.5,1[ x [0,1[. This doesn't make much difference in most scenes, mainly helps if you have a few large area lights or some types of HDR backgrounds.
2017-09-05Fix T52433: Volume Absorption color tintSergey Sharybin
Need to exit the volume stack when shadow ray laves the medium. Thanks Brecht for review and help in troubleshooting!
2017-08-19Code cleanup: move rng into path state.Brecht Van Lommel
Also pass by value and don't write back now that it is just a hash for seeding and no longer an LCG state. Together this makes CUDA a tiny bit faster in my tests, but mainly simplifies code.
2017-05-07Cycles: Implement denoising option for reducing noise in the rendered imageLukas Stockner
This commit contains the first part of the new Cycles denoising option, which filters the resulting image using information gathered during rendering to get rid of noise while preserving visual features as well as possible. To use the option, enable it in the render layer options. The default settings fit a wide range of scenes, but the user can tweak individual settings to control the tradeoff between a noise-free image, image details, and calculation time. Note that the denoiser may still change in the future and that some features are not implemented yet. The most important missing feature is animation denoising, which uses information from multiple frames at once to produce a flicker-free and smoother result. These features will be added in the future. Finally, thanks to all the people who supported this project: - Google (through the GSoC) and Theory Studios for sponsoring the development - The authors of the papers I used for implementing the denoiser (more details on them will be included in the technical docs) - The other Cycles devs for feedback on the code, especially Sergey for mentoring the GSoC project and Brecht for the code review! - And of course the users who helped with testing, reported bugs and things that could and/or should work better!
2017-03-27Cycles: Add OpenCL support for shadow catcher featureHristo Gueorguiev
The title says it all actually.
2017-03-27Cycles: Remove ccl_addr_space from RNG passed to functionsHristo Gueorguiev
Simplifies code quite a bit, making it shorter and easier to extend. Currently no functional changes for users, but is required for the upcoming work of shadow catcher support with OpenCL.
2017-03-09Cycles: SSS and Volume rendering in split kernelHristo Gueorguiev
Decoupled ray marching is not supported yet. Transparent shadows are always enabled for volume rendering. Changes in kernel/bvh and kernel/geom are from Sergey. This simiplifies code significantly, and prepares it for record-all transparent shadow function in split kernel.
2016-10-30Cycles: Add optional probabilistic termination of light samples based on ↵Lukas Stockner
their expected contribution In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways. To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased. This is the same approach that's also used in path termination based on length. Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise. Reviewers: #cycles Subscribers: sergey, brecht Differential Revision: https://developer.blender.org/D2217
2016-09-26Cycles: Use correct light sampling PDF for MIS calculation with Branched ↵Lukas Stockner
Path Tracing The light sampling functions calculate light sampling PDF for the case that the light has been randomly selected out of all lights. However, since BPT handles lamps and meshlights separately, this isn't the case. So, to avoid a wrong result, the code just included the 0.5 factor in the throughput. In theory, however, the correction should be made to the sampling probability, which needs to be doubled. Now, for the regular calculation, that's no real difference since the throughput is divided by the pdf. However, it does matter for the MIS calculation - it's unbiased both ways, but including the factor in the PDF instead of the throughput should give slightly better results. Reviewers: sergey, brecht, dingto, juicyfruit Differential Revision: https://developer.blender.org/D2258
2016-09-14Cycles: Stop lamp sampling if the lamp isn't visibleLukas Stockner
Both spot and area light have large areas where they're not visible. Therefore, this patch stops the light sampling code when one of these cases (outside of the spotlight cone or behind the area light) occurs, before the lamp shader is evaluated. In the case of the area light, the solid angle sampling can also be skipped. In a test scene with Sample All Lights and 18 Area lamps and 9 Spot lamps that all point away from the area that the camera sees, render time drops from 12sec to 5sec. Reviewers: brecht, sergey, dingto, juicyfruit Differential Revision: https://developer.blender.org/D2216
2016-08-01Cycles: Tweaks to support CUDA 8 toolkitSergey Sharybin
All the changes are mainly giving explicit tips on inlining functions, so they match how inlining worked with previous toolkit. This make kernel compiled by CUDA 8 render in average with same speed as previous kernels. Some scenes are somewhat faster, some of them are somewhat slower. But slowdown is within 1% so far. On a positive side it allows us to enable newer generation cards on buildbots (so GTX 10x0 will be officially supported soon).
2016-05-23Cycles CUDA: reduce stack memory by reusing ShaderData.Brecht Van Lommel
57% less for path and 48% less for branched path.
2016-03-25Cycles: Cleanup, indent nested preprocessor directivesSergey Sharybin
Quite straightforward, main trick is happening in path_source_replace_includes(). Reviewers: brecht, dingto, lukasstockner97, juicyfruit Differential Revision: https://developer.blender.org/D1794
2016-01-07Cycles: Refactor how we pass bounce info to light path node.Thomas Dinges
This commit changes the way how we pass bounce information to the Light Path node. Instead of manualy copying the bounces into ShaderData, we now directly pass PathState. This reduces the arguments that we need to pass around and also makes it easier to extend the feature. This commit also exposes the Transmission Bounce Depth to the Light Path node. It works similar to the Transparent Depth Output: Replace a Transmission lightpath after X bounces with another shader, e.g a Diffuse one. This can be used to avoid black surfaces, due to low amount of max bounces. Reviewed by Sergey and Brecht, thanks for some hlp with this. I tested compilation and usage on CPU (SVM and OSL), CUDA, OpenCL Split and Mega kernel. Hopefully this covers all devices. :)
2015-03-13Cycles: Simplify volume light connect code.Thomas Dinges
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-11-06Cycles: Add "Max Bounce" control for lampsThomas Dinges
With this setting, we can limit the influence of a lamp to a certain amount of bounces. 0 = Only direct light contribution 1 = 1 light bounce ... Differential revision: https://developer.blender.org/D860 You can find an example render in the release logs: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.73/Cycles
2014-10-15Fix T42160: CUDA error: ILLEGAL_ADDRESS in cuCtxSynchronize()Sergey Sharybin
This is so-called GPU limitation boundary hit, told compiler to NOT include volume bound function, otherwise some real weird things used to happen. We actually might want to do the same for CPU, inlining everything is not the way to get fastest code.
2014-09-03Fix T41693: Volumes get brightened with extra volume samples on GPU + BPTSergey Sharybin
2014-09-01Cleanup: Silence compiler warning.Thomas Dinges
2014-08-25Cleanup: Remove unused variable in kernel_path_volume_bounce().Thomas Dinges
2014-08-21Code refactor: Split __VOLUME__ defines in Cycles.Thomas Dinges
* __VOLUME__ is basic volume support with Emission and Absorption. * __VOLUME_SCATTER__ enables volume Scattering support. * __VOLUME_DECOUPLED__ enables Decoupled Ray Marching.
2014-08-21Cycles: Further tweak for Decoupled Ray MarchingThomas Dinges
Avoid some if checks when probalistic_scatter is false. Differential Revision: https://developer.blender.org/D743
2014-08-14Cycles: Avoid intermediate function when we sample all lamps.Thomas Dinges
2014-08-14Cycles: Avoid segment NULL check, we access it before this function already.Thomas Dinges
2014-07-13Fix T40987: Distant Lamps have no influence on Volumes.Thomas Dinges
Differential Revision: https://developer.blender.org/D639
2014-07-05Cycles: Compile fixes for CUDA Volumetrics.Thomas Dinges
* CUDA can be compiled with Volume support again, change line 78 kernel_types.h for that. Volumes are still fragile on GPU though, got some Memory/Address CUDA errors in tests.. needs to be investigated more deeply.
2014-06-14Cycles: volume light samplingBrecht Van Lommel
* Volume multiple importace sampling support to combine equiangular and distance sampling, for both homogeneous and heterogeneous volumes. * Branched path "Sample All Direct Lights" and "Sample All Indirect Lights" now apply to volumes as well as surfaces. Implementation note: For simplicity this is all done with decoupled ray marching, the only case we do not use decoupled is for distance only sampling with one light sample. The homogeneous case should still compile on the GPU because it only requires fixed size storage, but the heterogeneous case will be trickier to get working.
2014-06-14Cycles code refactor: move some surface and volume path code to separate files.Brecht Van Lommel