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
2017-03-29Cycles: Make all #include statements relative to cycles source directorySergey Sharybin
The idea is to make include statements more explicit and obvious where the file is coming from, additionally reducing chance of wrong header being picked up. For example, it was not obvious whether bvh.h was refferring to builder or traversal, whenter node.h is a generic graph node or a shader node and cases like that. Surely this might look obvious for the active developers, but after some time of not touching the code it becomes less obvious where file is coming from. This was briefly mentioned in T50824 and seems @brecht is fine with such explicitness, but need to agree with all active developers before committing this. Please note that this patch is lacking changes related on GPU/OpenCL support. This will be solved if/when we all agree this is a good idea to move forward. Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner Reviewed By: lukasstockner97, maiself, nirved, dingto Subscribers: brecht Differential Revision: https://developer.blender.org/D2586
2017-03-28Cycles: Switch to reformulated Pluecker ray/triangle intersectionSergey Sharybin
The intention of this commit it to address issues mentioned in the reports T43865,T50164 and T50452. The code is based on Embree code with some extra vectorization to speed up single ray to single triangle intersection. Unfortunately, such a fix is not coming for free. There is some slowdown for AVX2 processors, mainly due to different vectorization code, which caused different number of instructions to be executed and different instructions-per-cycle counters. But on another hand this commit makes pre-AVX2 platforms such as AVX and SSE4.1 a bit faster. The prerformance goes as following: 2.78c AVX2 2.78c AVX Patch AVX2 Patch AVX BMW 05:21.09 06:05.34 05:32.97 (+3.5%) 05:34.97 (-8.5%) Classroom 16:55.36 18:24.51 17:10.41 (+1.4%) 17:15.87 (-6.3%) Fishy Cat 08:08.49 08:36.26 08:09.19 (+0.2%) 08:12.25 (-4.7% Koro 11:22.54 11:45.24 11:13.25 (-1.5%) 11:43.81 (-0.3%) Barcelone 14:18.32 16:09.46 14:15.20 (-0.4%) 14:25.15 (-10.8%) On GPU the performance is about 1.5-2% slower in my tests on GTX1080 but afraid we can't do much as a part of this chaneg here and consider it a price to pay for more proper intersection check. Made in collaboration with Maxym Dmytrychenko, big thanks to him! Reviewers: brecht, juicyfruit, lukasstockner97, dingto Differential Revision: https://developer.blender.org/D1574
2017-03-27Cycles: First implementation of shadow catcherSergey Sharybin
It uses an idea of accumulating all possible light reachable across the light path (without taking shadow blocked into account) and accumulating total shaded light across the path. Dividing second figure by first one seems to be giving good estimate of the shadow. In fact, to my knowledge, it's something really similar to what is happening in the denoising branch, so we are aligned here which is good. The workflow is following: - Create an object which matches real-life object on which shadow is to be catched. - Create approximate similar material on that object. This is needed to make indirect light properly affecting CG objects in the scene. - Mark object as Shadow Catcher in the Object properties. Ideally, after doing that it will be possible to render the image and simply alpha-over it on top of real footage.
2017-03-24Cycles: Workaround incorrect SSS with CUDA toolkit 8.0.61Sergey Sharybin
2017-03-23Cycles: Use SSE-optimized version of triangle intersection for motion trianglesSergey Sharybin
The title says it all actually. Gives up to 10% speedup on test scenes here on i7-6800K. Render times on GPU are unreliable here, but there might be some slowdown caused by watertight nature of intersections.
2017-03-23Cycles: Move triangle intersection precalc to an util fileSergey Sharybin
This is a preparation work for the followup commit which wil l move remaining parts of Woop intersection logic to an utility file. Doing it as a separate commit to keep changes more atomic and easier to bisect when/if needed.
2017-03-10Cycles: Cleanup, extra semicolon and spaceSergey Sharybin
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.
2017-02-13Cycles: Optimize sorting of transparent intersections on CUDASergey Sharybin
2017-02-13Cycles: Fix wrong transparent shadows with CUDASergey Sharybin
Was a bug in recent optimization commit.
2017-02-08Cycles: Fix compilation error on OpenCLSergey Sharybin
2017-02-08Cycles: Implement record-all transparent shadow function for GPUSergey Sharybin
The idea is to record all possible transparent intersections when shooting transparent ray on GPU (similar to what we were doing on CPU already). This avoids need of doing whole ray-to-scene intersections queries for each intersection and speeds up a lot cases like transparent hair in the cost of extra memory. This commit is a base ground for now and this feature is kept disabled for until some further tweaks.
2017-01-23Cycles: Split ShaderData object and shader flagsSergey Sharybin
We started to run out of bits there, so now we separate flags which came from __object_flags and which are either runtime or coming from __shader_flags. Rule now is: SD_OBJECT_* flags are to be tested against new object_flags field of ShaderData, all the rest flags are to be tested against flags field of ShaderData. There should be no user-visible changes, and time difference should be minimal. In fact, from tests here can only see hardly measurable difference and sometimes the new code is somewhat faster (all within a noise floor, so hard to tell for sure). Reviewers: brecht, dingto, juicyfruit, lukasstockner97, maiself Differential Revision: https://developer.blender.org/D2428
2017-01-23Cycles: Make object flag names more obvious that hey are object and not shaderSergey Sharybin
2017-01-20Cycles: Store time in BVH nodesSergey Sharybin
This way we can stop traversing BVH node early on. Gives about 2-2.5x times render time improvement with 3 BVH steps. Hopefully this gives no measurable performance loss for scenes with single BVH step. Traversal is currently only implemented for QBVH, meaning old CPUs and GPU do not benefit from this change.
2017-01-13Cycles: Fix wrong transparent shadows for motion blur hairSergey Sharybin
This was a missing bit from b53ce9a.
2017-01-12Cycles: Prepare BVH traversal code to work with multiple curve primitives ↵Sergey Sharybin
per node
2017-01-12Cycles: Correct assert() for cases when there are multiple curves per BVH nodeSergey Sharybin
2017-01-12Cycles: Use dedicated debug passes for traversed nodes and intersection testsSergey Sharybin
This way it's more clear whether some issue is caused by lots of geometry in the node or by lots of "transparent" BVH nodes.
2016-10-25Cycles: Use new SSE version of offset calculation for all QBVH flavorsSergey Sharybin
Gives up to ~1% speedup again. While it seems to be small, still nice since the code now is actually more clean that it used to be before.
2016-10-25Cycles: Move QBVH near/far offset calculation to an utility functionSergey Sharybin
Just preparing for new optimization to be used in all traversal implementation. Should be no measurable difference.
2016-10-25Cycles: BVH-related SSE optimizationSergey Sharybin
Several ideas here: - Optimize calculation of near_{x,y,z} in a way that does not require 3 if() statements per update, which avoids negative effect of wrong branch prediction. - Optimization of direction clamping for BVH. - Optimization of point/direction transform. Brings ~1.5% speedup again depending on a scene (unfortunately, this speedup can't be sum across all previous commits because speedup of each of the changes varies from scene to scene, but it still seems to be nice solid speedup of few percent on Linux and bigger speedup was reported on Windows). Once again ,thanks Maxym for inspiration! Still TODO: We have multiple places where we need to calculate near x,y,z indices in BVH, for now it's only done for main BVH traversal. Will try to move this calculation to an utility function and see if that can be easily re-used across all the BVH flavors.
2016-10-03Fix Cycles CUDA performance on CUDA 8.0.Brecht Van Lommel
Mostly this is making inlining match CUDA 7.5 in a few performance critical places. The end result is that performance is now better than before, possibly due to less register spilling or other CUDA 8.0 compiler improvements. On benchmarks scenes, there are 3% to 35% render time reductions. Stack memory usage is reduced a little too. Reviewed By: sergey Differential Revision: https://developer.blender.org/D2269
2016-09-29Cycles: Cleanup file headersSergey Sharybin
Some of the files were wrongly attributing code to some other organizations and in few places proper attribution was missing. This is mainly either a copy-paste error (when new file was created from an existing one and header wasn't updated) or due to some refactor which split non-original-BF code with purely BF code. Should solve some confusion around.
2016-09-20Cycles: Make regular bvh traversal functions close to each otherSergey Sharybin
2016-09-20Cycles: Re-group ifdef so we check for particular feature only onceSergey Sharybin
2016-09-20Cycles: Avoid conversion from bool to uintSergey Sharybin
2016-09-19Cycles: More tweaks to make specialized BVH traversal matchingSergey Sharybin
2016-09-19Cycles: Avoid redundant intersection pre-calculationSergey Sharybin
2016-09-19Cycles: Cleanup, sync some comments across different traversalSergey Sharybin
2016-09-19Cycles: Cleanup, always use parenthesisSergey Sharybin
Makes it simpler to compare different traversal algorithms.
2016-09-19Cycles: Move BVH constants to an own files, so they are easily re-usableSergey Sharybin
2016-09-14Cycles: Also support the constant emission speedup for mesh lightsLukas Stockner
Reviewers: brecht, sergey, dingto, juicyfruit Differential Revision: https://developer.blender.org/D2220
2016-08-25Cycles: Support proper visibility check in single volume intersection step ↵Sergey Sharybin
for QBVH
2016-08-25Cycles: Implement proper visibility check in QBVH volume all intersectionSergey Sharybin
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-26Cycles: Revert previous fixes to intersect_all functionsSergey Sharybin
While they prevent legit write past the array boundary error those fixes introduced regression in behavior when having exact max_hits transparent intersections and nothing else. Previous code would have considered such case a totally opaque, but it's not correct. Fixes T48941: Some materials don't get transparent shadows anymore
2016-07-14Cycles: Fix wrong termination criteria in intersect_all functionsSergey Sharybin
It was possible to miss bounces termination criteria in this functions, mainly when max_hits was set to 0. Made the check more robust in traversal functions (which should not affect performance, it's an operation of same complexity AFAIK). Also avoid doing ray-scene intersection from shadow_blocked when limit of transparent bounces was already reached.
2016-07-11Cycles: Fix compilation error on Windows with OSL enabledSergey Sharybin
Seems there's some conflict around `near` identifier in that configuration.
2016-07-11Cycles: Fix typoSergey Sharybin
2016-07-11Fix T48824: Crash when having too many ray-to-volume intersectionsSergey Sharybin
Code might have writing past the array boundaries.
2016-07-11Cycles: Use utility define for restrict pointersSergey Sharybin
This way restrict can be used for CUDA and OpenCL as well. From quick tests in areas i've been testing this it might give some barely measurable %% of speedup, but it increases registers pressure. So use of this qualifier is still really limited.
2016-07-11Cycles: Cleanup, variables nameSergey Sharybin
Using camel case for variables is something what didn't came from our original code, but rather from third party libraries. Let's avoid those as much as possible.
2016-07-11Cycles: Add _all suffix to shadow traversal fileSergey Sharybin
Matches better naming of volume traversal files, where we've got optimized versions of a single step of volume intersection and traversal which will gather all volume intersections.
2016-07-11Cycles: Move BVK kernel files to own directorySergey Sharybin
BVH traversal is not really that much a geometry and we've got quite some traversals now. Makes sense to keep them separate in the name of source structure clarity.