|
|
|
|
|
|
|
|
|
|
|
|
|
|
// build coarse list using AABB |
|
|
|
#ifdef USE_TWO_PASS_TILED_LIGHTING |
|
|
|
int NrBigTilesX = (nrTilesX+3)>>2; |
|
|
|
const int bigTileIdx = (tileIDX.y>>2)*NrBigTilesX + (tileIDX.x>>2); // map the idx to 64x64 tiles |
|
|
|
int nrBigTileLights = g_vBigTileLightList[MAX_NR_BIGTILE_LIGHTS_PLUSONE*bigTileIdx+0]; |
|
|
|
for(int l0=(int) t; l0<(int) nrBigTileLights; l0 += NR_THREADS) |
|
|
|
{ |
|
|
|
int l = g_vBigTileLightList[MAX_NR_BIGTILE_LIGHTS_PLUSONE*bigTileIdx+l0+1]; |
|
|
|
#else |
|
|
|
#endif |
|
|
|
const float3 vMi = g_vBoundsBuffer[l]; |
|
|
|
const float3 vMa = g_vBoundsBuffer[l+g_iNrVisibLights]; |
|
|
|
|
|
|
|