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-21Cycles: Fix building of OpenCL kernelsMai Lavelle
Theres no overloading of functions in OpenCL so we can't make use of `safe_normalize` with `float2`.
2017-03-20Fix T50990: Random black pixels in Cycles when rendering material with ↵Sergey Sharybin
Multiscatter GGX
2017-03-13Cycles: Make MESA compiler more happySergey Sharybin
While this compiler is not officially supported yet, getting it to work is a nice thing because more and more AMD cards will fall under MESA driver. It's also nice to use explicit comparison with NULL, which makes it more clear whether variable is a boolean or pointer. Even Rust enforces this! Patch by Ian Bruce with own modifications.
2017-03-08Cycles: Remove ccl_fetch and SOAMai Lavelle
2016-12-14Cycles: Fix uninitialized variable issue after recent changesSergey Sharybin
2016-12-14Cycles: Consider GGX/Beckmann/Ashikhmin of 0 roughness a singular raySergey Sharybin
This matches behavior of Multiscatter GGX and could become handy later on when/if we decide it would be beneficial to replace on closure with another. Reviewers: lukasstockner97, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D2413
2016-12-01Fix T50075: Assert during debug render of hair_geom_transmission.blendSergey Sharybin
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-28Cycles: Cleanup, indentationSergey Sharybin
2016-09-28Cycles: Fix compilation error with minimal feature setSergey Sharybin
2016-09-25Cycles: Fix T49411: Multiscatter GGX with zero roughness when Filter Glossy ↵Lukas Stockner
is enabled
2016-08-05Cycles: Fix embarrassing typoSergey Sharybin
Spotted by Mai Lavelle, thanks!
2016-08-02Cycles: Some more inline policy tweaks for CUDA 8Sergey Sharybin
Makes it so toolkit does exactly the same decision about what to inline, but unfortunately it has really barely visible difference on GTX-980.
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-31Cycles: refactor kernel closure storage to use structs per closure type.Brecht Van Lommel
Reviewed By: dingto, sergey Differential Revision: https://developer.blender.org/D2127
2016-07-28Cycles: Fix difference in Ashikhmin Shirley shader between CPU and GPUSergey Sharybin
The issue was caused by some NaN appearing in calculations. Visible with scifi_armor_concept.blend from the cloud.
2016-07-25Cycles: Fix rays parallel to the surface in the triangle refine and MultiGGX ↵Lukas Stockner
code In the triangle intersection refinement code, rays that are parallel to the triangle caused a divide by zero. These rays might initially hit the triangle due to the watertight intersection test, but are very rare - therefore, just skipping the refinement for them works fine. Also, a few remaining issues in the MultiGGX code are fixed that were caused by rays parallel to the surface (which happened more often there due to smooth shading).
2016-07-25Cycles: Calculate differentials in the Multiscattering GGX closuresLukas Stockner
The Multiscattering GGX closures didn't set the omega_i differentials, which could cause undefined behaviour.
2016-07-17Cycles: Fix OpenCL compilation after the recent numerical fixesLukas Stockner
2016-07-16Cycles: Fix three numerical issues in the fresnel, normal map and Beckmann codeLukas Stockner
- In fresnel_dielectric, the differentials calculation sometimes divided by zero. - When the normal map was (0.5, 0.5, 0.5), the code would try to normalize a zero vector. Now, it just uses the regular normal as a fallback. - The approximate error function used in Beckmann sampling sometimes overflowed to inf while calculating r^16. The final value is 1 - 1/r^16, however, so now it just returns 1 if the computation would overflow otherwise.
2016-07-16Cycles: Deduplicate geometric factor calculation in the Beckmann distributionLukas Stockner
Also, this fixes a numerical issue where A would be inf. Since later G is set to 1 if A is larger than 1.6, the code now checks the reciprocal of A for being smaller than 1/1.6 - same effect, but no inf involved.
2016-06-28Fix T48732: New GGX breaks OpenCL kernelSergey Sharybin
Make sure we don't perform any implicit address space conversion. A bit annoying, but less intrusive approaches (like using temp private variable in .cl kernel) do not work correct here. Using generic address space will help from code side here, but will be somewhat slower due to extra things happening as far as i know.
2016-06-26Fix T48732 v2: New GGX breaks OpenCL kernelLukas Stockner
As far as I can see, the second issue there was that the functions receive a pointer to a member variable of the ShaderData, which is stored in global memory. However, this means that the pointer points to global memory as well, therefore OpenCL requires the ccl_addr_space "keyword" in front of the pointer. With this commit, the OpenCL kernels build on Linux with the Intel CPU OpenCL runtime - however, they already did without the change and I don't have an AMD card, so I can't really test whether the AMD runtime is happy as well now.
2016-06-25Fix T48732, OpenCL compile failure after Multiscatter GGX commit.Thomas Dinges
Use OpenCL "all" builtin type for conversion, according to OpenCL 1.1 spec 6.3e.
2016-06-23Cycles: Add multi-scattering, energy-conserving GGX as an option to the ↵Lukas Stockner
Glossy, Anisotropic and Glass BSDFs This commit adds a new distribution to the Glossy, Anisotropic and Glass BSDFs that implements the multiple-scattering microfacet model described in the paper "Multiple-Scattering Microfacet BSDFs with the Smith Model". Essentially, the improvement is that unlike classical GGX, which only models single scattering and assumes the contribution of multiple bounces to be zero, this new model performs a random walk on the microsurface until the ray leaves it again, which ensures perfect energy conservation. In practise, this means that the "darkening problem" - GGX materials becoming darker with increasing roughness - is solved in a physically correct and efficient way. The downside of this model is that it has no (known) analytic expression for evalation. However, it can be evaluated stochastically, and although the correct PDF isn't known either, the properties of MIS and the balance heuristic guarantee an unbiased result at the cost of slightly higher noise. Reviewers: dingto, #cycles, brecht Reviewed By: dingto, #cycles, brecht Subscribers: bliblubli, ace_dragon, gregzaal, brecht, harvester, dingto, marcog, swerner, jtheninja, Blendify, nutel Differential Revision: https://developer.blender.org/D2002
2016-06-17Fix T46492: GGX distribution produces black pixelsSergey Sharybin
The issue was caused by some numerical instability.
2016-04-13Cycles: Minor cleanup, whitespace around keyword and preprocessor indentSergey Sharybin
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-13Cycles: Fixes for Burley BSSRDFSergey Sharybin
There are several fixes in here, which hopefully will make the shader working correct without too much magic in there. First of all, this commit brings BURLEY_TRUNCATE down from 30 to 16 which reduces noise a lot. It's still higher than original truncate from Brecht, but this reduces PDF value at a cutoff distance by an order of magnitude (now it's 0.008387, previously it was 0.063521 for the albedo of 0.8 and radius 1.0). This should converge to a proper result faster and don't have artifacts. This kind of reverts fix for T47356, but after additional thinking came to conclusion Burley is not being totally smooth, it is about giving less waxy results which it's kind of doing in the file. Second of all, this commit fixes burley_eval() to use normalized diffusion reflectance. This matches the way we calculate CDF and solves numeric instability close to 0, making PDF profile looking closer to other SSS profiles: https://developer.blender.org/F282355 https://developer.blender.org/F282356 https://developer.blender.org/F282357 Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D1792
2016-02-08Cycles: Fix Burley's CDF truncation after recent radius fixSergey Sharybin
This is all not really ideal, but good enough for tonight. More thoughts and investigation tomorrow!
2016-02-08Fix T47356: Too sharp falloww with Burley BSSRDFSergey Sharybin
After the clamping commit we need to bump BURLEY_TRUNCATE constant a bit, otherwise mean free path does not really match the disk radius needed for importance sampling.
2016-02-06Fix Burley BSSRDF NaNs and fireflies.Brecht Van Lommel
Explicitly truncate to Rm same way as the Gaussian BSSRDF, and use safe_sqrtf() to be sure in case of float precision issues.
2016-02-05Cycles: Fix for initial guess of the radius for Burley BSSRDFSergey Sharybin
The value was too high, causing bad Newton iteration step. Now the value is not so good, but it's still within 9 iterations and those high number of iterations are only happening in approx 1% of input values.
2016-02-04Cycles: Speedup of Christensen-Burley SSS falloff functionSergey Sharybin
The idea is simply to pre-compute fitting and parameterization in the bssrdf_setup() function and re-use the values in both sample() and eval(). The only trick is where to store the pre-calculated values and the answer is inside of ShaderClosure->custom{1,2,3}. There's no memory bump here because we now simply re-use padding fields for the pre-calculated values. Similar trick we can do for other BSDFs. Seems to give nice speedup up to 7% here on my desktop with Core i7 CPU, SSE4.1 kernel.
2016-02-04Cycles: Implement approximate reflectance profilesSergey Sharybin
Using this paper: http://graphics.pixar.com/library/ApproxBSSRDF/paper.pdf This model gives less blurry results than the Cubic and Gaussian we had implemented: - Cubic: https://developer.blender.org/F279670 - Burley: https://developer.blender.org/F279671 The model is called "Christensen-Burley" in the interface, which actually should be read as "Physically based" or "Realistic". Reviewers: juicyfruit, dingto, lukasstockner97, brecht Reviewed By: brecht, dingto Subscribers: robocyte Differential Revision: https://developer.blender.org/D1759
2016-02-02Cycles: Cleanup and reference actual paper used for BSSRDF samplingSergey Sharybin
2015-07-31Cycles: Fix for transmissive microfacet samplingSergey Sharybin
This is an alternate fix for T40964 which resolves bad handling of caustics reported in T45609. There were too much transmission rays being discarded by the original fix, which caused by caustic light being totally disabled. There is still some room for investigation why exactly original paper didn't work that well, could be caused by the way how the pdf is calculated. In any case current results seems rather correct now.
2015-06-11Cycles: Simplify volume_phase_eval().Thomas Dinges
This simplification is safe, as the call to volume_phase_eval() is guarded behind a CLOSURE_IS_PHASE check, which is equal to CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID. I don't think we will add more phase functions anytime soon, if at all.
2015-05-09Cycles: OpenCL kernel splitGeorge Kyriazis
This commit contains all the work related on the AMD megakernel split work which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely someone else which we're forgetting to mention. Currently only AMD cards are enabled for the new split kernel, but it is possible to force split opencl kernel to be used by setting the following environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1. Not all the features are supported yet, and that being said no motion blur, camera blur, SSS and volumetrics for now. Also transparent shadows are disabled on AMD device because of some compiler bug. This kernel is also only implements regular path tracing and supporting branched one will take a bit. Branched path tracing is exposed to the interface still, which is a bit misleading and will be hidden there soon. More feature will be enabled once they're ported to the split kernel and tested. Neither regular CPU nor CUDA has any difference, they're generating the same exact code, which means no regressions/improvements there. Based on the research paper: https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf Here's the documentation: https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit Design discussion of the patch: https://developer.blender.org/T44197 Differential Revision: https://developer.blender.org/D1200
2015-04-27Cycles: Use native saturate function for CUDASergey Sharybin
This more a workaround for CUDA optimizer which can't optimize clamp(x, 0, 1) into a single instruction and uses 4 instructions instead. Original patch by @lockal with own modification: Don't make changes outside of the kernel. They don't make any difference anyway and term saturate() has a bit different meaning outside of kernel. This gives around 2% of speedup in Barcelona file, but in more complex shader setups with lots of math nodes with clamping speedup could be much nicer. Subscribers: dingto Projects: #cycles Differential Revision: https://developer.blender.org/D1224
2015-04-26Cleanup: Code style.Thomas Dinges
2015-04-06Cycles: Cleanup, spaces around assignment operatorSergey Sharybin
Did some bad spacing in recent commits, better to get rid of those so they does not confuse those who're working on sources.
2015-04-06Cycles: de-duplicate fast/approximate erf function calculationSergey Sharybin
Our own implementation is in fact the same performance as in fast_math from OpenShadingLanguage, but implementation from fast_math is using explicit madd function, which increases chance of compiler deciding to use intrinsics.
2015-04-05Cycles: Avoid using lookup table for Beckmann slopes on GPUSergey Sharybin
This patch is based on some work done in D788 and re-formulation from Beckmann implementation in OpenShadingLanguage. Skipping texture lookup helps a lot on GPUs where it's more expensive to access texture memory than to do some extra calculation in threads. CPU code still uses lookup-table based approach since this seems to be still faster (at least on computers i've got access to). This change gives about 2% speedup on BMW scene with GTX560TI.
2015-04-05Cycles: Remove unused Beckmann slope sampling codeSergey Sharybin
It did not preserve stratification too well and lookup-table approach was working much better. There are now also some more interesting forumlation from Wenzel and OpenShadingLanguage which should work better than old code.
2015-04-01Fix T44113: Ashikhmin-Shirley distribution of glossy shader at 0 roughness ↵Sergey Sharybin
causes artifacts when background uses MIS Was a division by zero error, solved in the same way as beckmann/ggx deals with small roughness values.
2015-03-27Cycles: Code cleanup, spaces around keywordsSergey Sharybin
This inconsistency drove me totally crazy, it's really confusing when it's inconsistent especially when you work on both Cycles and Blender sides. Shouldn;t cause merge PITA, it's whitespace changes only, Git should be able to merge it nicely.
2015-03-25Fix T44123: Cycles SSS renders black in recent buildsSergey Sharybin
Issue was introduced in 01ee21f where i didn't notice *_setup() function only doing partial initialization, and some of parameters are expected to be initialized by callee function. This was hitting only some setups, so tests with benchmark scenes didn't unleash issues. Now it should all be fine. This is to go to the 2.74 branch and we actually might re-AHOY.
2015-03-23Fix T43926: Volume scatter: intersecting objects GPU rendering artifactsSergey Sharybin
Fix T44007: Cycles Volumetrics: block artifacts with overlapping volumes The issue was caused by uninitialized parameters of some closures, which lead to unpredictable behavior of shader_merge_closures().
2015-02-18Cleanup: Remove unused SD_PHASE_HAS_EVAL flag.Thomas Dinges
We only have a non-singular volume closure and therefore no need to distinguish it.