qdtk / openshadinglanguage

Automatically exported from code.google.com/p/openshadinglanguage
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

reduce OSL overhead #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I did a simple experiment using John's <edit> scene with matte shading (ie: 
only matte and 
emissive are used). I replaced the shader call with manual closure construction 
as follows:

<edit>

Here are the results for a render with light=2,hemi=2 and 2 bounces:

AA=3     AA=5
full shader  3:09    8:33
closure only     2:07    5:40
The difference increases with AA, so I figure what we're seeing is not a 
one-time overhead, but 
rather a per sample overhead. The amount of memory allocation is theoretically 
the same (one 
closure created per shader execution). The number of rays traced is also 
identical.

These results shouldn't be affected by temporary coalescing (there are hardly 
any temporaries), 
derivatives (minimal math is done in the shader) or on-demand layer execution 
(there is no 
network on either the surface or the light).

I need to do more digging to see exactly where the time is being spent on the 
OSL side.

Original issue reported on code.google.com by rene.lim...@gmail.com on 11 Jan 2010 at 7:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by rene.lim...@gmail.com on 13 Jan 2010 at 12:59

GoogleCodeExporter commented 9 years ago
No longer applicable, performance is fine now that we've switched to single 
point shading and LLVM JIT.

Original comment by larrygr...@gmail.com on 23 Feb 2011 at 7:48