Page Menu
Home
Search
Configure Global Search
Log In
Paste
P527
Closure cutoff
Active
Public
Actions
Authored by
Sergey Sharybin (sergey)
on Sep 5 2017, 1:32 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
loc.h b/intern/cycles/kernel/closure/alloc.h
index e799855a65e..f8a5e8d64d0 100644
--- a/intern/cycles/kernel/closure/alloc.h
+++ b/intern/cycles/kernel/closure/alloc.h
@@ -24,6 +24,10 @@ ccl_device ShaderClosure *closure_alloc(ShaderData *sd, int size, ClosureType ty
int num_closure_extra = sd->num_closure_extra;
if(num_closure + num_closure_extra >= MAX_CLOSURE)
return NULL;
+ float sample_weight = fabsf(average(weight));
+ if(sample_weight <= CLOSURE_WEIGHT_CUTOFF) {
+ return NULL;
+ }
ShaderClosure *sc = &sd->closure[num_closure];
Event Timeline
Sergey Sharybin (sergey)
created this paste.
Sep 5 2017, 1:32 PM
Sergey Sharybin (sergey)
created this object with edit policy "Administrators".
Sergey Sharybin (sergey)
mentioned this in
T52433: Volume Absorption color tint
.
Sep 5 2017, 1:42 PM
Log In to Comment