Commit Graph

4527 Commits

Author SHA1 Message Date
Sergey Sharybin
d2d1b19170 Cycles: Expose volume voxel data interpolation to the interface
It is per-material setting which could be found under the Volume settings
in the material and world context buttons.

There could still be some code-wise improvements, like using variable-size
macro for interp3d instead of having interp3d_ex to which you can pass the
interpolation method.
2014-10-22 19:53:06 +06:00
Sergey Sharybin
c24698a37e Cycles: Implement tricubic b-spline interpolation for CPU texture_image
This is the first step towards supporting cubic interpolation for voxel
data (such as smoke and fire). It is not epxosed to the interface at all
yet, this is to be done soon after this change.
2014-10-22 19:41:58 +06:00
Sergey Sharybin
5e2f3c0102 Fix T42178: Cycles Film Exposure not triggering Viewport update 2014-10-21 14:08:28 +02:00
Bastien Montagne
09351c68e1 Cleanup, since we don't put Cycles compat into regular bl_ui files. ;) 2014-10-17 21:07:21 +02:00
Dalai Felinto
7fb68cf83f Fix python module (bpy) compilation - broken since 8d084e8c
(reported on bf-python mailing-list and in my github (!), let's hope in
the future we get more reports in developer.blender.org instead ;))
2014-10-17 12:00:54 -03:00
Sergey Sharybin
80a3f4fecf Cycles: Fix for possibly uninitialized variable
That's rather harmless in the master, just could cause some issues with the patches.
2014-10-17 10:57:19 +02:00
Thomas Dinges
b0ef008741 Different fix for T42262, we don't put Cycles compat into regular bl_ui files. 2014-10-16 23:27:38 +02:00
Sergey Sharybin
bc411ec06e Cycles: Implement an area preserving parameterization sampling for area lamps
Replace old code for area lamps which was more like incorrect with more correct
one using the following paper as a reference:

  Carlos Urena et al.
  An Area-Preserving Parametrization for Spherical Rectangles.
  https://www.solidangle.com/research/egsr2013_spherical_rectangle.pdf

Implementation is straight from the paper, currently the rectangle constants are
calculated for each of the samples. Ideally we need to pre-calculate them.

Some comparison images are available there

  http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.73/Cycles

Reviewers: brecht, juicyfruit

Subscribers: dingto, ton

Differential Revision: https://developer.blender.org/D823
2014-10-16 14:40:29 +02:00
Sergey Sharybin
acd7f50308 Fix T42160: CUDA error: ILLEGAL_ADDRESS in cuCtxSynchronize()
This is so-called GPU limitation boundary hit, told compiler to NOT include
volume bound function, otherwise some real weird things used to happen.

We actually might want to do the same for CPU, inlining everything is not
the way to get fastest code.
2014-10-15 16:25:04 +02:00
Sergey Sharybin
63dc2e9b74 Futher tweaks to WITH_CPU_SSE option
Explicitly disable SSE kernels in Cycles when this option is used.
2014-10-15 18:45:09 +06:00
Sergey Sharybin
e556670b36 Cycles: Do cuda pointer arithmetic in integers, don't use pointer arithmetic
This should hopefully fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765187
2014-10-14 17:54:41 +02:00
Campbell Barton
5918fcb5e7 Cleanup: ws 2014-10-14 17:49:37 +02:00
Jens Verwiebe
11e7679d1c OSX/GHOST: replace spaces with tabs in sesponese to rB424c050a6fc1
New IDE did not take over my former setting for preferring tabs
2014-10-14 17:27:36 +02:00
Dan Horák
c86c9297dc Fix inconsistent types in guardealloc
This basically fixes mix of size_t and uintptr_t usages which might be different size.
2014-10-14 16:11:20 +02:00
Sergey Sharybin
383bd34111 Fix T42021: OSL doesn't work when there are non-ascii chars in the path
Quite annoying, the same thing we do from the blender side, But as a positive
side we can get rid of some utf8/utf16 conversions.

Hopefully it all work fine now, at leats works on mu russki windoze laptop.
2014-10-14 14:56:21 +02:00
Jens Verwiebe
e0cacb808c OSX: refinement for last fullscreen condition commit 2014-10-14 13:17:14 +02:00
Jens Verwiebe
424c050a6f OSX: only use lionstylefullscreen when seperate spaces are used, todo: use respondsToSelector to simplify the whole detection 2014-10-14 12:48:16 +02:00
Jason Wilkins
4d4da31ee5 in GHOST_ContextWGL.cpp, in functions that use goto, converted declarations to C89 style to prevent jumping over constructors 2014-10-13 19:20:01 -05:00
Thomas Dinges
cc03689962 Fix embarrassing typo... 2014-10-13 15:26:00 +02:00
Thomas Dinges
858bf1adea Cycles: Add CUDA support for sm_32 (Tegra K1, Jetson TK1).
Fix T42174.
2014-10-12 18:17:00 +02:00
Thomas Dinges
744aaa955f Cleanup: Typo fix for Blackbody variable, had different naming in the comments and also in OSL. 2014-10-12 14:18:30 +02:00
Campbell Barton
abd38c00f1 Cycles: set hit values in-order 2014-10-11 11:17:08 +02:00
Jason Wilkins
815919b1fb fixed printf format warning that occurred with 64-bit targets 2014-10-10 23:21:44 -05:00
Jason Wilkins
dd897de061 check for missing Windows error code headers (was missing from Mingw64) 2014-10-10 23:21:44 -05:00
Bastien Montagne
0f1c3958da Fix typo breaking compilation with rather strict flags (does not like implicit double to float conversion). 2014-10-10 15:11:23 +02:00
Sergey Sharybin
5711025765 Cycles: Use a bit better approach for erfinv()
Also reduce number of branching and multiplications a bit by inlining the branches.

This gives an unmeasurable speedup, which is in case of BMW is about 2% here.
2014-10-10 13:40:09 +02:00
Jens Verwiebe
fd6537a53a OSX: as an prerequisite to make Dalai's upcoming "area_fullsceen" work,
make sure the window states are correct in the lion_fs animation phase.
This also assures the CTX_wm_window(C) is okay.
2014-10-10 12:58:52 +02:00
Sergey Sharybin
f2280661cb Enable atomic peak memory detection
This gives more precise information about memory usage which might be real handy
when doing memory optimization.

It works good here for as long as i can tell but if for some reason you'll be
experiencing some weird slowdown please let me know.
2014-10-10 01:55:57 +06:00
Sergey Sharybin
45ce901079 Cycles: Remove redundant float4->float3 conversion
Not as if it gives noticeable changes render-time, but it's just weird to
convert float4 to float 3 to just access individual x/y/z components.

Plus some compilers might be more stupid than GCC and don't optimize this
out well.
2014-10-09 11:48:47 +02:00
Antony Riakiotakis
e1ef451996 Fix OpenGL error on cycles rendered viewport.
We queried the wrong value when looking for the bound 2D texture. This
is not totally robust because currently bound texture may not be a 2D
one, but this should work for now.
2014-10-08 12:19:06 +02:00
Campbell Barton
efee3be1d3 Cycles: enable double promotion warning /w gcc 2014-10-08 10:58:40 +02:00
Sergey Sharybin
47b8bf591c Fix more issues after recent context commit 2014-10-08 04:15:51 +06:00
Campbell Barton
be3a6d78e8 Cycles: reduce float/double conversions 2014-10-08 00:13:26 +02:00
Campbell Barton
e2522b4a29 Cycles: correct math wrappers
include the parens around value before cast,
in some cases was causing double/float promotion by only casting the left value.
2014-10-08 00:13:26 +02:00
Jason Wilkins
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
Sergey Sharybin
409b3c9c9c Fix T42106: Box image mapping shows black triangles if they point to a corner and blend is 0
After discussion with cambo here we decided it's better to choose arbitrary side of the box
(in this case it's X-axis) and use image from it. That's better than doing a blackness.

P.S. This is literally a corner case anyway.
2014-10-07 15:48:39 +02:00
Campbell Barton
4c60aae66c Cleanup: warnings 2014-10-06 23:19:07 +02:00
Sergey Sharybin
939fa6759c Cycles: Fix for camera-in-volume detection
Ray actually should have infinite length, so we can detect camera in a volume
which is bigger that the far clipping of the camera.

This might also give some speedup (wouldn't expect much tho) because we don't
need to re-calculate ray direction and length after every bounce now.
2014-10-06 12:36:46 +02:00
Sergey Sharybin
233de800e2 Cycles: Optimize of volume stack update when sampling SSS
basically we skip all non-volume objects now in the volume stack function.
Depending on the show it might give some percent of speedup.

Most of the speedup would be gained in the scenes when having SSS object
intersecting the volume and taking a reasonable amount of frame space.
2014-10-06 12:36:46 +02:00
Sergey Sharybin
b36eb51d37 Cycles: Fix for viewport rendering with debug enabled 2014-10-06 12:36:46 +02:00
Sergey Sharybin
cd6129d1ff Cycles: Workaround dead-slow expf() on 64bit linux
Single precision exponent on 64bit linux tends to be order of magnitude slower
than double precision version even with single<->double precision conversion.

Some feedback in the mailing lists also suggests that logf() is also slow, but
this i didn't confirm here in the studio yet.

Depending on the shader setup it gives ~3% with the secret agent shot and up to
around 15% with the bmw scene here.
2014-10-06 12:36:46 +02:00
Sergey Sharybin
1f1dcdfd76 Cycles: Move system headers include to the top of the files
This is a good practice to do anyway, plus it'll help with the upcoming change.
2014-10-06 12:36:46 +02:00
Greg Zaal
6feac1e940 Cycles: Center Tile order had a slight offset to the left.
Signed-off-by: Thomas Dinges
2014-10-05 18:35:49 +02:00
Thomas Dinges
a1b27d6424 Fix T42081, OpenCL supports float3 since the 1.1 specification, not sure why we needed this. 2014-10-05 18:10:42 +02:00
Sergey Sharybin
d3a7f3fa29 Cycles: Forgot to set WITH_CYCLES_DEBUG for OSL kernel 2014-10-05 17:43:54 +02:00
Sergey Sharybin
e4b910a0aa Cycles: __KERNEL_DEBUG__ wasn't set for compile-time kernels 2014-10-05 21:42:53 +06:00
Jens Verwiebe
9241f12e10 OSX/Ghost: little code cleanup 2014-10-05 12:45:14 +02:00
Sergey Sharybin
68f2066602 Cycles: Make OpenCL folks happy to use __KERNEL_DEBUG__
Quite straightforward change, the only annoying thing is that we can't use
indentation for include directive just because of the way headers inlineing
works for OpenCL.

Might do smarter job in path_source_replace_includes() but don't want to
spend time on this yet.
2014-10-05 16:00:23 +06:00
Sergey Sharybin
0106b94f9d Cycles: Fix for debug kernel not working with CUDA 2014-10-05 15:31:48 +06:00
Thomas Dinges
a613290775 Cycles / CUDA: Workaround to make sm_52 (Maxwell) cards work.
* sm_52 can run a sm_50 kernel, so tell runtime detection to use that until we build a dedicated sm_52 kernel.
2014-10-05 04:13:40 +02:00