Commit Graph

8 Commits

Author SHA1 Message Date
Sergey Sharybin
de35827612 Cycles: Fix wrong volume stack update with SSS object intersecting the volume
There's no need in moving ray at all, stack should always be updated from the
original hit point to the scattered one.
2015-11-25 13:01:22 +05:00
Sergey Sharybin
2a5c1fc9cc Cycles: Delay shooting SSS indirect rays
The idea is to delay shooting indirect rays for the SSS sampling and
trace them after the main integration loop was finished.

This reduces GPU stack usage even further and brings it down to around
652MB (comparing to 722MB before the change and 946MB with previous
stable release).

This also solves the speed regression happened in the previous commit
and now simple SSS scene (SSS suzanne on the floor) renders in 0:50
(comparing to 1:16 with previous commit and 1:03 with official release).
2015-11-25 13:01:22 +05:00
Sergey Sharybin
8bca34fe32 Cysles: Avoid having ShaderData on the stack
This commit introduces a SSS-oriented intersection structure which is replacing
old logic of having separate arrays for just intersections and shader data and
encapsulates all the data needed for SSS evaluation.

This giver a huge stack memory saving on GPU. In own experiments it gave 25%
memory usage reduction on GTX560Ti (722MB vs. 946MB).

Unfortunately, this gave some performance loss of 20% which only happens on GPU.
This is perhaps due to different memory access pattern. Will be solved in the
future, hopefully.

Famous saying: won in memory - lost in time (which is also valid in other way
around).
2015-11-25 13:01:22 +05:00
Thomas Dinges
e6f7f36e40 Cleanup: Style in for loops header. 2015-06-29 00:56:04 +02:00
Thomas Dinges
291152e127 Add back ray bounces debug code, can be useful nevertheless.
Just need to keep in mind that these are not indirect bounces in the pass then.
2015-06-16 00:39:11 +02:00
Thomas Dinges
53e3e46332 Cycles / Branched Path: Some simplifications for main loop.
The main loop only handles transparent intersections from the camera ray.
Therefore we can simplify some things.

* Avoid PATH_RAY_CAMERA check, this is always true.
* Avoid path_state_next() call, we can just set transparent flag and increase transparent bounces. This way we avoid the function call and some branching.

Also remove debug num_ray_bounces++, this is incorrect here as no indirect bounce happens here.

Should be no functional changes.
2015-06-15 23:50:29 +02:00
Thomas Dinges
888ed6b7f1 Cleanup comment and remove now redundant define. 2015-06-15 23:35:38 +02:00
Sergey Sharybin
099aaea447 Cycles: Move branched path tracking into own file
Code there started becoming a bit too big, by splitting it up it'll make it
easier to do improvements or extending the features in there.

The layout is not totally final yet, would need to try de-duplicating parts
of code from split kernel with non-split integrators,
2015-06-15 23:02:42 +02:00