Page MenuHome

Cycles: Optimize check for transparent surface in shadow rays cast
ClosedPublic

Authored by Sergey Sharybin (sergey) on Oct 16 2014, 11:43 PM.

Details

Summary

Basic idea is to use primitive visibility flag for this instead of
fetching the triangle index, shader, shader flags for each of the
intersections.

This seems to give about 2% speedup on my laptop,

Just for the record -- we're now getting out of free bits in the
primitive visibility flags, so we might want to split them up so
o.e. flags controlled from the interface doesn't share the same
bit field as the "internal" flags.

Diff Detail

Repository
rB Blender
Branch
cycles_transparent_surface_visibility

Event Timeline

Sergey Sharybin (sergey) retitled this revision from to Cycles: Optimize check for transparent surface in shadow rays cast.
Sergey Sharybin (sergey) updated this object.
Thomas Dinges (dingto) edited edge metadata.

GCC 4.8, Intel Core i5 3570, Linux x64

koro_final.blend

Vanilla:
1:56.60
1:56.54

With Patch:
1:56.41
1:56.42

So barely noticeable in that scene, still does not hurt to add it. :)

This revision is now accepted and ready to land.Oct 17 2014, 10:41 PM

What is the status here? Any stopper?

Sergey Sharybin (sergey) edited edge metadata.

Update against latest master

Brecht Van Lommel (brecht) edited edge metadata.

Looks good to me. Render times are fine too.

CPU render timeGTX 1080 render time
BMW-0.3%-1.3%
Classroom-0.5%-1.0%
Fishy Cat-0.2%-2.9%
Koro-0.1%0.0%
Pabellon-1.6%-1.0%

Quite old revision. The idea could still be useful, but needs to be done as an object level flags.