Fix use of uninitialized variable in recent SSS fix.

This commit is contained in:
Brecht Van Lommel 2016-07-24 16:39:41 +02:00
parent f283aa61c5
commit f23fecf306
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ ccl_device_inline void triangle_intersect_subsurface(
const float inv_det = 1.0f / det;
const float t = T * inv_det;
for(int i = min(max_hits, ss_isect->num_hits); i >= 0; --i) {
for(int i = min(max_hits, ss_isect->num_hits) - 1; i >= 0; --i) {
if(ss_isect->hits[i].t == t) {
return;
}