|
In practice with our production shaders, were were often getting Ci's with many components that were duplicates. We figured this wasn't great for performance and also wouldn't be the best input for our integrator. So I've modified the "closure add" to check if components are duplicates, and if so merge them by adding the weights rather than appending. Also to not bother merging if the weights are 0.
Results:
Baseline:
4:45 1427 MB
Largest Ci closure constructed: 12 components
Tiny weight components: 7037131 / 128325701 (5.4838% of components, present in 3.48453% of Ci's)
Zero weight components: 6719907 / 128325701 (5.2366%)
After my changes:
4:32 1403 MB
Largest Ci closure constructed: 4 components
Tiny weight components: 42956 / 113090187 (0.0379838% of components, present in 0.0426577% of Ci's)
Zero weight components: 0 / 113090187 (0%)
So it's a tad faster, an eensy bit less memory, and the images look just a bit less noisy now.
Total comments: 3
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+422 lines, -31 lines) |
Patch |
 |
|
src/include/oslclosure.h
|
View
|
1
2
|
5 chunks |
+37 lines, -1 line |
3 comments
|
Download
|
 |
|
src/liboslexec/background.cpp
|
View
|
1
2
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_ashikhmin_velvet.cpp
|
View
|
1
2
|
1 chunk |
+11 lines, -1 line |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_cloth.cpp
|
View
|
1
2
|
1 chunk |
+23 lines, -1 line |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_cloth_specular.cpp
|
View
|
1
2
|
1 chunk |
+21 lines, -1 line |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_diffuse.cpp
|
View
|
1
2
|
2 chunks |
+20 lines, -2 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_fakefur.cpp
|
View
|
1
2
|
3 chunks |
+56 lines, -0 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_hair.cpp
|
View
|
1
2
|
2 chunks |
+21 lines, -2 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_microfacet.cpp
|
View
|
1
2
|
2 chunks |
+27 lines, -2 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_phong.cpp
|
View
|
1
2
|
2 chunks |
+27 lines, -2 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_reflection.cpp
|
View
|
1
2
|
2 chunks |
+20 lines, -1 line |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_refraction.cpp
|
View
|
1
2
|
2 chunks |
+22 lines, -2 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_transparent.cpp
|
View
|
1
2
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_ward.cpp
|
View
|
1
2
|
1 chunk |
+12 lines, -1 line |
0 comments
|
Download
|
 |
|
src/liboslexec/bsdf_westin.cpp
|
View
|
1
2
|
2 chunks |
+22 lines, -2 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/bssrdf.cpp
|
View
|
1
2
|
1 chunk |
+11 lines, -1 line |
0 comments
|
Download
|
 |
|
src/liboslexec/closure.cpp
|
View
|
2
|
4 chunks |
+60 lines, -9 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/closure_test.cpp
|
View
|
1
2
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
|
src/liboslexec/emissive.cpp
|
View
|
1
2
|
1 chunk |
+13 lines, -1 line |
0 comments
|
Download
|
Total messages: 12
|