Commit Graph

5897 Commits

Author SHA1 Message Date
Pascal Schön 00a1378b98 disney diffuse und specular implemented 2016-05-24 16:51:12 +02:00
Pascal Schön 6baa7a7eb7 disney diffuse is working correctly 2016-05-24 16:51:11 +02:00
Pascal Schön d8fa169bf3 added vessel for disney diffuse shader 2016-05-24 16:51:09 +02:00
Sergey Sharybin 42b26206c6 Fix T48508: Cycles Regression / Crash 2016-05-24 14:53:34 +02:00
Sergey Sharybin e1dd83b399 Fix T48486: Not enough precision in Volume Sampling Step Size input
Volumes might be small, makes sense to use more precision here.
2016-05-24 12:17:06 +02:00
Bastien Montagne a7c3ec4feb GHOST cleanup (null check before delete, and 0 -> NULL for pointers).
Based on patch from Lawrence D'Oliveiro (ldo) in T48499.
2016-05-24 11:49:30 +02:00
Brecht Van Lommel 999d5a6785 Cycles CUDA: reduce stack memory by reusing ShaderData.
57% less for path and 48% less for branched path.
2016-05-23 22:29:24 +02:00
Sergey Sharybin 2aa4b6045a Cycles: Fix wrong closure counter in feature adaptive kernel
Some closures were missing from calculation, leading to an array
under-allocation, presumable causing memory corruption issues with
emission shaders on OpenCL and was causing issues with Volume 3D
textures with CUDA.

The issue was identified by Thomas Dinges, the patch is different
from the original D2006. See the brief discussion there. Current
approach is similar (or the same) as Brecht suggested.
2016-05-23 14:09:27 +02:00
Sergey Sharybin 6894bb0555 Fix T48334: Cycles standalone xml import of uv coordinates
In Cycle standalone, the xml import of uv's is done in a way that
a vertex could only have one unique uv coordinate. In practice it
is most of the time not the case.

Patch by Laurent Boiron, thanks!
2016-05-23 13:38:15 +02:00
Stefan Werner 7a35a0f419 Fixed a rare case of NaN in Cycles
This fixes a rare case where NaNs could exist inside Cycles.

When certain invalid meshes were passed in, Cycles would try too normalize
a zero length normal during its setup stage. While it does check against
division by zero, it still returns a zero length normal and passes it on to
the path tracing kernel. The kernel then operates under the assumption that
normals are valid, and in the case of such a zero length normal, would
eventually create NaNs that propagate through and result in black pixels.

Reviewers: #cycles

Subscribers: brecht, sergey

Projects: #cycles

Differential Revision: https://developer.blender.org/D2008
2016-05-23 13:34:14 +02:00
Sergey Sharybin abe98de63c Cycles: Fix missing feature reported by the Volume node 2016-05-23 12:58:25 +02:00
Sergey Sharybin 065c052cfb Cycles: Fix missing volumes support for feature-adaptive viewport render 2016-05-23 12:36:31 +02:00
Thomas Dinges a2669b0cbf Cleanup: Deduplicate image loading functions using templates. 2016-05-22 23:24:26 +02:00
Thomas Dinges 84a9d171da Cleanup: Use short condition style. 2016-05-22 22:47:37 +02:00
Brecht Van Lommel 27e4ce0cf6 Fix Cycles warning in release builds. 2016-05-22 19:42:45 +02:00
Brecht Van Lommel f7c28a66e2 Fix Cycles compile errors with GCC due to double promotion as errors. 2016-05-22 19:17:22 +02:00
Brecht Van Lommel ca03eddfcc Cleanup: remove Cycles layer bits checking in the kernel.
At some point the idea was that we could have an optimization where we could
render multiple render layers without re-exporting the scene, by just updating
the layer bits. We are not doing this now and in practice with the available
render layer control like exclude layers it's not always possible anyway.

This makes it easier to support an arbitrary number of layers in the future
(hopefully this summer), and frees up some useful bits in the kernel.

Reviewed By: sergey, dingto

Differential Revision: https://developer.blender.org/D2020
2016-05-22 17:36:38 +02:00
Brecht Van Lommel 9b9921b765 Code refactor: nodify Cycles shader and lights.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
Brecht Van Lommel e7d13b8a1d Code refactor: nodify Cycles background and film.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
Brecht Van Lommel 0062d9f58c Code refactor: nodify Cycles integrator.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
Brecht Van Lommel 226dc75e77 Code refactor: add generic Cycles XML node read and write functions.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:25 +02:00
Brecht Van Lommel ec51175f1f Code refactor: add generic Cycles node infrastructure.
Differential Revision: https://developer.blender.org/D2016
2016-05-22 17:29:24 +02:00
Campbell Barton 24a3a9e8a3 Cleanup: remove unused doxy config 2016-05-22 17:15:08 +10:00
Thomas Dinges a5a05fc291 Cycles: Fix long compile time with MSVC.
Compile time per kernel increased alot after recent image commits, re-shuffle some code to fix this.

Patch by "LazyDodo".

Differential Revision: https://developer.blender.org/D2012
2016-05-20 16:50:29 +02:00
Brecht Van Lommel 9d19533117 Fix T48472: issue in array refactor, causing performance regression in BVH build. 2016-05-20 10:58:11 +02:00
Lukas Stockner ad14c471eb Cycles: Add XML parsing of MappingNodes to Cycles Standalone
Reviewers: dingto, sergey

Differential Revision: https://developer.blender.org/D2009
2016-05-19 21:28:57 +02:00
Bastien Montagne 38f65c500c Fix T48204: Generic Tablet on Linux - Erratic strokes with pressure sensitivity enabled.
Once and for all - I hope!

So, for the records: Xinput1 events' valuators have a first_axis and axis_count defining the 'range'
of valid axes for that event - but valid data in the valuator's array **always** start at zero
(which means that, if event reports first axis as being axis 2, axis 2's value is in axis_data[0]).
2016-05-19 20:30:48 +02:00
Thomas Dinges dedc995018 Cycles / CUDA: Don't use bundled kernel if Adaptive is enforced by the user. 2016-05-19 16:32:57 +02:00
Thomas Dinges c9f1ed1e4c Cycles: Add support for bindless textures.
This adds support for CUDA Texture objects (also known as Bindless textures) for Kepler GPUs (Geforce 6xx and above).
This is used for all 2D/3D textures, data still uses arrays as before.

User benefits:
* No more limits of image textures on Kepler.
 We had 5 float4 and 145 byte4 slots there before, now we have 1024 float4 and 1024 byte4.
 This can be extended further if we need to (just change the define).

* Single channel textures slots (byte and float) are now supported on Kepler as well (1024 slots for each type).

ToDo / Issues:
* 3D textures don't work yet, at least don't show up during render. I have no idea whats wrong yet.
* Dynamically allocate bindless_mapping array?

I hope Fermi still works fine, but that should be tested on a Fermi card before pushing to master.

Part of my GSoC 2016.

Reviewers: sergey, #cycles, brecht

Subscribers: swerner, jtheninja, brecht, sergey

Differential Revision: https://developer.blender.org/D1999
2016-05-19 13:14:37 +02:00
Sergey Sharybin f74c7fcca2 Fix T47727: Weird bake results with non integer color values 2016-05-18 15:11:05 +02:00
Sergey Sharybin 792e147e2c Cycles: Fix compilation error of CUDA kernels after recent volume commit
Apparently the code path with malloc() was enabled for CUDA.
2016-05-18 11:15:28 +02:00
Sergey Sharybin cbe7f9dd03 Cycles: Pole merging for spherical stereo
The idea of pole merge is to fade interocular distance after a certain
altitude to zero when altitude goes closer to a pole. This should prevent
annoyances looking up in the sky or down to the bottom.

Works for both panorama and perspective cameras when Spherical Stereo
is enabled.

Reviewers: dfelinto, brecht

Reviewed By: brecht

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1998
2016-05-18 10:56:57 +02:00
Sergey Sharybin 7b356a8565 Cycles: Reduce amount of malloc() calls from the kernel
This commit makes it so malloc() is only happening once per volume and
once per transparent shadow query (per thread), improving scalability of
the code to multiple CPU cores.

Hard to measure this with a low-bottom i7 here currently, but from quick
tests seems volume sampling gave about 3-5% speedup.

The idea is to store allocated memory in kernel globals, which are per
thread on CPU already.

Reviewers: dingto, juicyfruit, lukasstockner97, maiself, brecht

Reviewed By: brecht

Subscribers: Blendify, nutel

Differential Revision: https://developer.blender.org/D1996
2016-05-18 10:14:24 +02:00
Sergey Sharybin 2433a537fa Cycles: Explicitly mark arguments as unused 2016-05-18 09:12:47 +02:00
Brecht Van Lommel 6f29dbd045 Fix issue in with multiple importance sampling in recent code refactor. 2016-05-18 01:51:30 +02:00
Brecht Van Lommel 9dc5367c89 Cleanup code style inconsistency in last commits. 2016-05-17 23:41:45 +02:00
Brecht Van Lommel 2b73402547 Fix C++11 build issues on OS X, remove references to outdated libs. 2016-05-17 21:39:16 +02:00
Brecht Van Lommel 0e8cd14dfe Code refactor: use shader pointers rather than shader indexes. 2016-05-17 21:39:16 +02:00
Brecht Van Lommel 08670d3b81 Code refactor: use dynamic shader node array lengths now that OSL supports them. 2016-05-17 21:39:16 +02:00
Brecht Van Lommel 93e4ae84ad Code refactor: add some array utility methods, fix leak in assignment operator. 2016-05-17 21:39:16 +02:00
Thomas Dinges 29a17d54da Fix CUDA MEMCPY condition, it should only copy 3D, 2D or 1D.
Found by Brecht, thanks!
2016-05-17 00:37:34 +02:00
Thomas Dinges 99d861169f Cycles / Requested Features: Volume was missing in logging print. 2016-05-17 00:36:22 +02:00
Bastien Montagne 75a96f8325 Atomic ops: add 'fetch_and_add_uint32' op.
Needed for next commit.
2016-05-16 15:56:39 +02:00
Sergey Sharybin 22d53e558d Cycles: Cleanup after recent refactor
Wrong indentation, wrong spacing.
2016-05-16 10:55:50 +02:00
Sergey Sharybin 8b92d728ae Fix T48421: AO pass broken, only works when AO in cycles is enabled 2016-05-13 17:33:40 +02:00
Sergey Sharybin 0903ee6ce2 Cycles: Scale debug pass with number of samples
This way it's easier to compare different renders together without
worrying about scale too much.
2016-05-13 11:22:18 +02:00
Thomas Dinges 3c85e1ca1a Cycles: Add support for single channel byte textures.
This way, we also save 3/4th of memory for single channel byte textures (e.g. Bump Maps).

Note: In order for this to work, the texture *must* have 1 channel only.
In Gimp you can e.g. do that via the menu: Image -> Mode -> Grayscale
2016-05-12 14:51:42 +02:00
Thomas Dinges cde10e774c Fix array bounds compile warning. 2016-05-12 14:20:12 +02:00
Thomas Dinges 8de3303a03 Cleanup: Fix typo. 2016-05-12 02:11:36 +02:00
Thomas Dinges 16ce1b78b0 Cleanup: Remove outdated comment and add new one about slot IDs. 2016-05-11 22:25:48 +02:00