|
|
|
|
|
|
|
|
|
|
//////////// cell specific code |
|
|
|
{ |
|
|
|
int pad = iNrCoarseLights & 1; |
|
|
|
for(int l=(int) t; l<((iNrCoarseLights+pad)>>1); l += NR_THREADS) |
|
|
|
for(int l=(int) t; l<((iNrCoarseLights+1)>>1); l += NR_THREADS) |
|
|
|
const int l0 = coarseList[2*l+0], l1 = coarseList[min(2*l+1,iNrCoarseLights-pad)]; |
|
|
|
const int l0 = coarseList[2*l+0], l1 = coarseList[min(2*l+1,iNrCoarseLights-1)]; |
|
|
|
const unsigned int clustIdxMi0 = (const unsigned int) min(255,SnapToClusterIdx(GetLinearDepth(g_vBoundsBuffer[l0].z), suggestedBase)); |
|
|
|
const unsigned int clustIdxMa0 = (const unsigned int) min(255,SnapToClusterIdx(GetLinearDepth(g_vBoundsBuffer[l0+g_iNrVisibLights].z), suggestedBase)); |
|
|
|
const unsigned int clustIdxMi1 = (const unsigned int) min(255,SnapToClusterIdx(GetLinearDepth(g_vBoundsBuffer[l1].z), suggestedBase)); |
|
|
|