[Bf-blender-cvs] [21dbfb7828] master: Cycles: Fix wrong transparent shadows with CUDA
Sergey Sharybin
noreply at git.blender.org
Mon Feb 13 18:27:54 CET 2017
Commit: 21dbfb7828f5085ec2c94d304ba19a6faa6303cc
Author: Sergey Sharybin
Date: Mon Feb 13 18:22:10 2017 +0100
Branches: master
https://developer.blender.org/rB21dbfb7828f5085ec2c94d304ba19a6faa6303cc
Cycles: Fix wrong transparent shadows with CUDA
Was a bug in recent optimization commit.
===================================================================
M intern/cycles/kernel/bvh/bvh.h
===================================================================
diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h
index 2055746a68..dfd7010601 100644
--- a/intern/cycles/kernel/bvh/bvh.h
+++ b/intern/cycles/kernel/bvh/bvh.h
@@ -381,7 +381,7 @@ ccl_device_inline void sort_intersections(Intersection *hits, uint num_hits)
int i, j;
for(i = 0; i < num_hits; ++i) {
for(j = 0; j < num_hits - 1; ++j) {
- if(hits[j].t < hits[j + 1].t) {
+ if(hits[j].t > hits[j + 1].t) {
struct Intersection tmp = hits[j];
hits[j] = hits[j + 1];
hits[j + 1] = tmp;
More information about the Bf-blender-cvs
mailing list