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-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-05-01Cleanup: comments (long lines) in cyclesCampbell Barton
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-07-30Merge branch 'master' into blender2.8Brecht Van Lommel
2018-07-30Cycles: Fixed OpenCL build. sqr(float4) is available on CUDA and CPU, but ↵Stefan Werner
not on OpenCL.
2018-07-29Merge branch 'master' into blender2.8Campbell Barton
2018-07-28Cycles: Save a few instructions in area light samplingLukas Stockner
Just basic algebra - because all vectors have the same z coordinate, a lot of terms end up cancelling out. Not exactly a massive improvement, but it's measurable with Branched PT and a high sample count on the lamp. Reviewers: brecht, sergey Reviewed By: brecht Subscribers: swerner Differential Revision: https://developer.blender.org/D3540
2018-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-06-14Merge remote-tracking branch 'origin/master' into blender2.8Lukas Stockner
2018-06-14Cycles: Automatically detect HDRI resolution by default and use non-square ↵Lukas Stockner
sampling map The automatic mode checks all Enviroment Texture nodes and picks the largest image's resolution. If there are no Enviroment Textures, it just uses the old default. Also, the sampling map now isn't limited to square shapes. The automatic detection uses the exact image size, the manual UI option now halves the value to get the height. A default aspect ratio of 2:1 makes sense since this is what most HDRIs use. Reviewers: brecht, sergey Differential Revision: https://developer.blender.org/D3477
2018-05-27Merge branch 'master' into blender2.8Campbell Barton
2018-05-27Cycles: Add Support for IES files as textures for light strengthLukas Stockner
This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources. The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp. Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried. Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file. The user interface of the node is similar to the script node, the user can either select an internal Text or load a file. Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot. The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light, rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport. Reviewers: #cycles, dingto, sergey, brecht Reviewed By: #cycles, dingto, brecht Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey Differential Revision: https://developer.blender.org/D1543
2018-05-24Cycles/Eevee: Implement disk and ellipse shapes for area lampsLukas Stockner
The implementation is pretty straightforward. In Cycles, sampling the shapes is currently done w.r.t. area instead of solid angle. There is a paper on solid angle sampling for disks [1], but the described algorithm is based on simply sampling the enclosing square and rejecting samples outside of the disk, which is not exactly great for Cycles' RNG (we'd need to setup a LCG for the repeated sampling) and for GPU divergence. Even worse, the algorithm is only defined for disks. For ellipses, the basic idea still works, but a way to analytically calculate the solid angle is required. This is technically possible [2], but the calculation is extremely complex and still requires a lookup table for the Heuman Lambda function. Therefore, I've decided to not implement that for now, we could still look into it later on. In Eevee, the code uses the existing ltc_evaluate_disk to implement the lighting calculations. [1]: "Solid Angle Sampling of Disk and Cylinder Lights" [2]: "Analytical solution for the solid angle subtended at any point by an ellipse via a point source radiation vector potential" Reviewers: sergey, brecht, fclem Differential Revision: https://developer.blender.org/D3171
2018-03-10Cycles: support arbitrary number of motion blur steps for objects.Brecht Van Lommel
2018-03-10Code refactor: use KernelLight instead of float4 arrays.Stefan Werner
Original patch by Stefan with modifications by Brecht.
2017-11-08Fix incorrect MIS weights in Cycles with multiple lights.Brecht Van Lommel
This causes some difference in the classroom scene, where ray visibility tricks are used and break the MIS balance. Otherwise there doesn't seem to be much effect, but better to use the right formulas. Problem originally identified by Lukas.
2017-09-13Code cleanup: avoid used of uninitialized value in case of precision issue.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-06Fix T52661: mesh light shader using backfacing not working, after new sampling.Brecht Van Lommel
2017-08-31Cycles: Cleanup, indentation and trailing whitespaceSergey Sharybin
2017-08-30Fixing T52477 - switching from custom ray/triangle intersection code to the ↵Stefan Werner
one from util_intersection.h. This fixes the bug and makes the code more readable and maintainable.
2017-08-17Cycles: Fix for a division by zero that could happen with solid angle ↵Stefan Werner
triangle light sampling
2017-08-17Improved triangle sampling for mesh lightsStefan Werner
This implements Arvo's "Stratified sampling of spherical triangles". Similar to how we sample rectangular area lights, this is sampling triangles over their solid angle. It does significantly improve sampling close to the triangle, but doesn't do much for more distant triangles. So I added a simple heuristic to switch between the two methods. Unfortunately, I expect this to add render time in any case, even when it does not make any difference whatsoever. It'll take some benchmarking with various scenes and hardware to estimate how severe the impact is and if it is worth the change. Reviewers: #cycles, brecht Reviewed By: #cycles, brecht Subscribers: Vega-core, brecht, SteffenD Tags: #cycles Differential Revision: https://developer.blender.org/D2730
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-01-23Cycles: Make object flag names more obvious that hey are object and not shaderSergey Sharybin
2016-10-29Cycles: Implement texture coordinates for Point, Spot and Area LampsLukas Stockner
When using the Normal output of the Texture Coordinate node on Point and Spot lamps, the coordinates now depend on the rotation of the lamp. On Area lamps, the Parametric output of the Geometry node now returns UV coordinates on the area lamp. Credit for the Area lamp part goes to Stefan Werner (from D1995).
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-09-11Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIEDMai Lavelle
Using ones complement for detecting if transform has been applied was confusing and led to several bugs. With this proper checks are made. Also added a few transforms where they were missing, mostly affecting baking and displacement when `P` is used in the shader (previously `P` was in the wrong space for these shaders) Also removed `TIME_INVALID` as this may have resulted in incorrect transforms in some cases. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2192
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-07-02Cleanup: comment blocksCampbell Barton
2016-06-07Cycles: Use faster ray-quad-intersection testLukas Stockner
The original quad intersection test works by just testing against the two triangles that define the quad. However, in this case it's actually faster to use the same test that's also used for portals: Determining the distance to the plane in which the quad lies, calculating the hitpoint and checking whether it's in the quad by projecting onto the sides. Reviewers: brecht, sergey, dingto Reviewed By: dingto Differential Revision: https://developer.blender.org/D2045
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-02-17Fix T47411: Cycles portals luminance artifactsLukas Stockner
When using multiple portals, scene areas behind one of the portals were rendered darker than they should. The reason for that is a pretty stupid mistake: Since portals are only used at positions that aren't behind them, only portals that are used should be accounted for in the PDF calculation. That was actually the case, but the final divide incorrectly divided by the total amount of portals, not the amount of visible ones. Another issue with areas behind portals was the PDF evaluation function. The new evaluation code is shorter, simpler and fixes this issue. Also, the threshold for the distance check was increased to avoid artifacts where portals touch a surface.
2016-02-15Cycles: Tweaks for 32bit CUDA binariesSergey Sharybin
Tweak some inline policies. Not totally crazy yet, and in fact we now have one less ifdef statement now.
2016-02-03Cycles: Cleanup, indentation and bracesSergey Sharybin
2016-01-14Cycles: Tweak inline policy for some functionsSergey Sharybin
The goal is to make Experimental kernel closer in performance to the official kernel, avoiding spills and such. There should not be big impact on official kernel, own tests showed few percent performance drop on laptop's GPU. CPU was always the same speed on AVX, AVX2 and SSE4.1 CPUs i've been testing here. This seems to be the last essential step before we can get rid of Experimental kernel and enable SSS officially on GPU without causing some major performance issues. Surely some more tweaks are possibly required, but that we can do for until cows go home anyway.
2015-09-09Cycles: Attempt to fix 32bit CUDA kernelsSergey Sharybin
2015-08-04Cycles: Remove 32bit cuda workaroudn and disable cubins for buildbotSergey Sharybin
Recent changes to kernel broke compilation of the kernels again, need some other kind of solution for this issue. Don't have much time for this currently, but will be addressed before the release. Meanwhile it's better to have some buildbot builds instead of totally failing one.
2015-07-21Cycles: Another attempt to solve CUDA compilation errors on 32bit platformsSergey Sharybin
2015-07-16Fix T45447: Area light importance sampling improvementStefan Werner
Turning on importance sampling on area lights increases noise on diffuse surfaces. This was caused by PDF calculated for an intersected point on light instead of original light position. Patch by Stefan with some own modifications.
2015-05-13Cleanup: Avoid temp variable in portal sampling code.Thomas Dinges
2015-05-13Cleanup / Cycles: De-Duplicate Portal data fetch and side check.Thomas Dinges
2015-04-28Cycles: Initialize portal variable directly, so we can avoid the one NULL check.Thomas Dinges
2015-04-27Cycles: Added support for light portalsLukas Stockner
This patch adds support for light portals: objects that help sampling the environment light, therefore improving convergence. Using them tor other lights in a unidirectional pathtracer is virtually useless. The sampling is done with the area-preserving code already used for area lamps. MIS is used both for combination of different portals and for combining portal- and envmap-sampling. The direction of portals is considered, they aren't used if the sampling point is behind them. Reviewers: sergey, dingto, #cycles Reviewed By: dingto, #cycles Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto Differential Revision: https://developer.blender.org/D1133
2015-03-03Cycles: Fix/workaround for toggling world MIS causing CUDA to failSergey Sharybin
Seems it's just another issue with the compiler, worked around by explicitly telling not to inline some function. In theory we can unify this with CPU, but we're quite close to the release so better be safe than sorry.
2015-02-17Cleanup: Add comment about light_p being modified in one case.Thomas Dinges
2015-02-17Cycles: Cleanup after recent changesSergey Sharybin
2015-02-17Some tweaks to last commit, this is better.Thomas Dinges
2015-02-17Cleanup: Deduplicate area light sampling code.Thomas Dinges