Commit Graph

15 Commits

Author SHA1 Message Date
Sv. Lockal
20b046d763 Cycles: workaround for noise performance regression in CUDA 5.5
Use manual ternary operation widening in grad(). Without it nvcc 5.5 produces multiple branch splits with very big branches (because of inlining). This solves 19% performance regression for BMW1M-MikePan.blend.

Also remove one redundant instruction in perlin SSE (when h == 12 or h == 14, then h is always >= 4).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D190
2014-01-08 22:25:55 +04:00
Sv. Lockal
4817da0df4 Cleanup: use blend() in perlin noise (gives 12 less instructions on SSE4.1) 2014-01-06 21:24:28 +04:00
Sv. Lockal
077fe03eaf Use ccl_device_inline for SSE perlin noise
msvc ignores inline hint here and generates a bunch of push/lea
2013-12-28 23:26:42 +04:00
Thomas Dinges
a92abf5089 Cycles / Perlin Noise: Optimize noise calculation by using SIMD instructions on CPU.
This makes scenes with a Noise Texture render faster, the BMW file is 12-15% faster now.

Patch by Sv. Lockal, many thanks! :)
2013-12-27 18:48:37 +01:00
c18712e868 Cycles: change __device and similar qualifiers to ccl_device in kernel code.
This to avoids build conflicts with libc++ on FreeBSD, these __ prefixed values
are reserved for compilers. I apologize to anyone who has patches or branches
and has to go through the pain of merging this change, it may be easiest to do
these same replacements in your code and then apply/merge the patch.

Ref T37477.
2013-11-18 08:48:15 +01:00
Brecht Van Lommel
d835d2f4e6 Code cleanup: avoid some warnings due to implicit uint/int/float/double conversion. 2013-06-07 16:06:17 +00:00
Brecht Van Lommel
8cf374d401 Cycles: different fix for perlin noise generating nan values, now check for
the result to be finite afterwards which is a bit faster and works for OSL
too without needing to slow down OSL itself.
2013-01-09 22:06:03 +00:00
Campbell Barton
fbe13ab84a style cleanup 2012-09-20 12:29:28 +00:00
Campbell Barton
2c1abe1f58 style cleanup: assignment & indentation. 2012-06-09 18:56:12 +00:00
Campbell Barton
0fbb6bff27 style cleanup: block comments 2012-06-09 17:22:52 +00:00
Brecht Van Lommel
4a427a441b Fix #30049: cycles noise texture producing nan values with some
texture coordinates, due to int overflow.

Also minor tweak in shader code to avoid copying uninitialized
values, should have no effect though because they were not used.
2012-02-07 17:32:01 +00:00
Brecht Van Lommel
df625253ac Cycles:
* Add max diffuse/glossy/transmission bounces
* Add separate min/max for transparent depth
* Updated/added some presets that use these options
* Add ray visibility options for objects, to hide them from
  camera/diffuse/glossy/transmission/shadow rays
* Is singular ray output for light path node

Details here:
http://wiki.blender.org/index.php/Dev:2.5/Source/Render/Cycles/LightPaths
2011-09-01 15:53:36 +00:00
Brecht Van Lommel
eac2674f1d Cycles: some tweaks to try to get sm_13 shader compiling. 2011-08-29 17:17:40 +00:00
Brecht Van Lommel
2996f08f84 Cycles: first batch of windows build fixes, not quite there yet. 2011-05-03 18:29:11 +00:00
Ton Roosendaal
da376e0237 Cycles render engine, initial commit. This is the engine itself, blender modifications and build instructions will follow later.
Cycles uses code from some great open source projects, many thanks them:

* BVH building and traversal code from NVidia's "Understanding the Efficiency of Ray Traversal on GPUs":
http://code.google.com/p/understanding-the-efficiency-of-ray-traversal-on-gpus/
* Open Shading Language for a large part of the shading system:
http://code.google.com/p/openshadinglanguage/
* Blender for procedural textures and a few other nodes.
* Approximate Catmull Clark subdivision from NVidia Mesh tools:
http://code.google.com/p/nvidia-mesh-tools/
* Sobol direction vectors from:
http://web.maths.unsw.edu.au/~fkuo/sobol/
* Film response functions from:
http://www.cs.columbia.edu/CAVE/software/softlib/dorf.php
2011-04-27 11:58:34 +00:00