Commit Graph

1894 Commits

Author SHA1 Message Date
Sergey Sharybin
d84c15696b Fix T41601: Correlated multi-jitter with high samples "hangs"
Issue was caused by the precision issues which made sdivm by 1 under
it's actual value. We can try to do some eps magic, but from the tests
on laptop and desktop doing integer division is not slower than using
floats here.
2014-08-28 15:15:59 +06:00
Dalai Felinto
146ed67d55 Cycles Aperture Ratio - option to produce anamorphic bokeh
Thanks for Aldo Zang for the help with the fix for the panorama/fisheye
depth of field calculation and the overall math.

Reviewed By: sergey, dingto

Subscribers: juicyfruit, gregzaal, #cycles, dingto, matray

Differential Revision: https://developer.blender.org/D753
2014-08-27 10:51:50 +02:00
Thomas Dinges
24ea3ab1a9 Cleanup: intrin.h is already included via util_optimization.h. 2014-08-27 03:22:36 +02:00
Sergey Sharybin
e827d904ae Move include outside of the CCL namespace 2014-08-27 00:11:06 +06:00
Thomas Dinges
fb3f32760d Cycles: Add an experimental CUDA kernel.
Now we build 2 .cubins per architecture (e.g. kernel_sm_21.cubin, kernel_experimental_sm_21.cubin).
The experimental kernel can be used by switching to the Experimental Feature Set: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Experimental_Features

This enables Subsurface Scattering and Correlated Multi Jitter Sampling on GPU, while keeping the stability and performance of the regular kernel.

Differential Revision: https://developer.blender.org/D762
Patch by Sergey and myself.

Developer / Builder Note:
CUDA Toolkit 6.5 is highly recommended for this, also note that building the experimental kernel requires a lot of system memory (~7-8GB).
2014-08-26 17:02:26 +02:00
Sergey Sharybin
44fc0ddee9 Cycles: Use compiler intrinsics for clz/ctz in CMJ code for MSVC 2014-08-26 14:22:08 +06:00
Thomas Dinges
e2c412f8cc Cycles: Make Correlated Multi Jitter a regular feature.
It can be helpful in some cases and it works properly, so no need to hide it behind the experimental flag anymore. It's only enabled for the CPU though.
2014-08-26 03:45:50 +02:00
Thomas Dinges
8d0b3e9902 Cycles: Enable Volumetric Rendering on GPU.
Limitations:
* Smoke/Fire rendering is *not* supported on GPU yet, that is also documented here: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Materials/Volume
* Decoupled Ray Marching is also not supported yet, so no Equi-Angular and MIS sampling yet.

Note for Builders and Developers:
* Make sure to use the CUDA Toolkit 6.5 from now on. 6.0 might still work, but can cause slower renders.
2014-08-25 17:23:06 +02:00
Sergey Sharybin
2a44844870 Fix T41532: Some files bounce back and forth between 'packing BVH nodes' and 'Copying Transforms to Device'
This was originally caused by a6ae12a where i didn't foresee unclear distinguishing
between empty and non-synced meshes will give issues for the viewport. They're the
same for final rendering, but for viewport we need to be accurate here.
2014-08-25 14:05:00 +06:00
Thomas Dinges
ae31b25fb5 Cycles: Fix wrong Volume Scattering in Branched Path integrator, when building without Decoupled Ray Marching.
The wrong throughput was used here.
2014-08-24 23:08:07 +02:00
Thomas Dinges
a25484eefa Cleanup: Remove unused variable in kernel_path_volume_bounce(). 2014-08-24 23:06:30 +02:00
Thomas Dinges
031620aba2 Cycles: Avoid redundant call to volume_stack_is_heterogeneous() for Distance Sampling. 2014-08-24 16:15:57 +02:00
Thomas Dinges
c89287e057 Cycles: Avoid call to volume_stack_sampling_method() on GPU, Decoupled is required for Equi-Angular/MIS. 2014-08-24 15:58:41 +02:00
Thomas Dinges
8ed818e0a1 Cycles: Remove Volume Nodes GPU warning and gray out Sampling Method button when using GPU. 2014-08-24 14:54:48 +02:00
Thomas Dinges
a0600debda Fix T41541: Cuda renders objects in black with MIS enabled in world setting
Issue introduced in 8d3cc431d7fdcc9f3243cc24dfdcb94124be0993, parameter mismatch.
2014-08-22 20:10:01 +02:00
Sergey Sharybin
4ff4bfcb9c Cycles: DPX is saved in the sRGB space and need to be converted to linear
This at least applies to DPX saved from within blender, which is 1st prio
to support working reliably.
2014-08-22 23:53:29 +06:00
Sergey Sharybin
7c052a8877 Cycles: Fix wrong image update tagging, float vs. byte images 2014-08-22 17:36:00 +06:00
Thomas Dinges
603348c56e Cycles: Drop support for CUDA 5.0 Toolkit, only 6.0 and 6.5 (recommended) are supported now. 2014-08-21 23:35:20 +02:00
Sergey Sharybin
2e5e1e2028 Fix T41267: Wrong light distribution with when having objects with motion blur 2014-08-21 17:57:02 +06:00
Thomas Dinges
ccf7b391cd Further cleanup for defines:
* Merge Texture defines
* Remove Normal Map define.
2014-08-20 23:27:59 +02:00
Thomas Dinges
161815576f Cleanup: Remove __ANISOTROPIC__ define.
That was only needed in the beginning, when we did not had support for tangents. It's time to clean some of the defines up, it's getting a bit too much.
2014-08-20 23:23:14 +02:00
Thomas Dinges
187d77612b Code refactor: Split __VOLUME__ defines in Cycles.
* __VOLUME__ is basic volume support with Emission and Absorption.
* __VOLUME_SCATTER__ enables volume Scattering support.
* __VOLUME_DECOUPLED__ enables Decoupled Ray Marching.
2014-08-20 23:15:30 +02:00
Thomas Dinges
075f6eff74 Cycles: Further tweak for Decoupled Ray Marching
Avoid some if checks when probalistic_scatter is false.

Differential Revision: https://developer.blender.org/D743
2014-08-20 22:59:08 +02:00
Sergey Sharybin
7bc87a372e Fix T40962: Ashikhmen Shirley shader fireflies 2014-08-19 20:58:58 +06:00
Dalai Felinto
8d3cc431d7 Fix T41471 Cycles Bake: Setting small tile size results in wrong bake with stripes rather than the expected noise pattern
This problem was introduced in 983cbafd1877f8dbaae60b064a14e27b5b640f18
Basically the issue is that we were not getting a unique index in the
baking routine for the RNG (random number generator).

Reviewers: sergey

Differential Revision: https://developer.blender.org/D749
2014-08-19 11:40:33 +02:00
Sergey Sharybin
a6ae12aa62 Fix T41474: Second renderlayer doesnt render if first one has 'Use Surfaces' disabled 2014-08-18 18:59:44 +06:00
Campbell Barton
bba80ed7af Cleanup 2014-08-17 12:18:40 +10:00
Bastien Montagne
fe2b461398 Fix poll func of CYCLES_OT_use_shading_nodes.
Operators' poll func might be called from anywhere in Blender, so they should
not make any assumption about available context. material, lamp and world
are specific to context from Properties space...
2014-08-16 22:42:02 +02:00
Bastien Montagne
9a29b0f155 Fix compilation on linux (implicit conversion from double/float to size_t treated as error here). 2014-08-15 15:44:50 +02:00
Dalai Felinto
983cbafd18 Final Fix T41222 Blender gives weird ouput when baking (4096*4096) resolution on GPU
It now uses the tile size to split the job. For CPU this may add
overhead, but for GPU this is highly needed.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D690
2014-08-15 11:27:42 +02:00
Dalai Felinto
2c5b6859d9 Revert "Fix T41222 Blender gives weird output when baking (4096*4096) resolution on GPU"
This reverts commit a48b372b04421b00644a0660bfdf42229b5ffceb.

Leaving only the part that fix device_multi.cpp
2014-08-15 11:27:42 +02:00
Thomas Dinges
5bdea81319 Cycles: Don't check closure flag in kernel_volume_decoupled_scatter(), we check this before the function already. 2014-08-14 21:25:52 +02:00
Thomas Dinges
32a5313b41 Cycles: Optimize Equi-Angular sampling using binary range search.
Patch by Lukas Tönne and myself.
2014-08-14 20:21:36 +02:00
Thomas Dinges
5af00a3d12 Cycles: Optimization for Heterogeneous Volume Shadows.
* Don't compute expf() for every step, instead sum the intermediate values and calculate it every N (8 for now) steps. This helps a few percent (~5% on a cube with wave texture) in my tests here.
2014-08-14 20:09:25 +02:00
Thomas Dinges
8ff3cf3e56 Cleanup: typos and extra brackets. 2014-08-14 16:31:53 +02:00
Thomas Dinges
5a74fe63d0 Cycles: Avoid intermediate function when we sample all lamps. 2014-08-14 16:09:40 +02:00
Thomas Dinges
6e5d188d17 Cycles: Avoid segment NULL check, we access it before this function already. 2014-08-14 15:52:19 +02:00
Sergey Sharybin
c256072e91 Cycles: Correction to previous commit -- forgot to take instancing into account 2014-08-14 11:48:50 +06:00
Sergey Sharybin
bfaf4f2d0d Fix T41219: Cycles backface detection doesn't work properly
Root of the issue goes back to the on-fly normals commit and the
latest fix for it wasn't actually correct. I've mixed two fixes
in there.

So the idea here goes back to storing negative scaled object flag
and flip runtime-calculated normal if this flag is set, which is
pretty much the same as the original fix for the issue from me.

The issue with motion blur wasn't caused by the rumtime normals
patch and it had issues before, because it already did runtime
normals calculation. Now made it so motion triangles takes the
negative scale flag into account.

This actually makes code more clean imo and avoids rather confusing
flipping code in mesh.cpp.
2014-08-13 16:35:54 +06:00
Campbell Barton
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
Tamito Kajiyama
7b1234be1c Removed/disabled debugging code. 2014-08-12 10:10:37 +09:00
Tamito Kajiyama
c38e80d632 WIP commit just for a record of a working snapshot of code revisions for node-based textured strokes. 2014-08-12 10:10:35 +09:00
Tamito Kajiyama
1741df1e36 Removed debug prints. 2014-08-12 10:10:11 +09:00
Tamito Kajiyama
f75d87bd76 Initial implementation of Cycles materials for Freestyle stroke rendering. 2014-08-12 10:10:06 +09:00
Sergey Sharybin
8bed4e6040 Fix T41362: CPU and GPU rendering gives different results
We can't really make CPU and GPU results look the same in all possible
circumstances, but here we can make them look close enough to each other
by making it so sobol pattern for bounce number is the smae for both
CPU and GPU.

This makes CPU and GPU render results look the same with low number of
samples, high number of samples was never an issue.
2014-08-11 22:29:27 +06:00
Martijn Berger
c020bd2e73 Cycles OpenCL error to string removed in favour of the same function in clew. 2014-08-09 14:27:40 +02:00
Thomas Dinges
e3ed13cbd4 Cleanup: Remove special code for Visual Studio 2008.
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
2014-08-07 13:52:15 +02:00
Jens Verwiebe
c0c037f41d OSX/clang: Fix T41123, crashing osl when optimization level > O0 is used for osl_shaders.cpp 2014-08-06 13:25:06 +02:00
Martijn Berger
4cf531f7a0 Fix T41318: API change in OSL, I see no other cases but there might be 2014-08-05 23:49:42 +02:00
Dalai Felinto
a48b372b04 Fix T41222 Blender gives weird output when baking (4096*4096) resolution on GPU
In collaboration with Sergey Sharybin.

Also thanks to Wolfgang Faehnle (mib2berlin) for help testing the
solutions.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D690
2014-08-05 13:50:50 -03:00