|
|
@@ -203,9 +203,9 @@ technique TiledDeferredLighting
|
|
|
// Find radial & spot lights overlapping the tile
|
|
|
for(uint type = 0; type < 2; type++)
|
|
|
{
|
|
|
- uint lightsStart = threadIndex + gLightStrides[type];
|
|
|
+ uint lightsStart = gLightStrides[type];
|
|
|
uint lightsEnd = lightsStart + gLightCounts[type + 1];
|
|
|
- for (uint i = lightsStart; i < lightsEnd && i < MAX_LIGHTS; i += TILE_SIZE)
|
|
|
+ for (uint i = threadIndex + lightsStart; i < lightsEnd && i < MAX_LIGHTS; i += TILE_SIZE)
|
|
|
{
|
|
|
float4 lightPosition = mul(gMatView, float4(gLights[i].position, 1.0f));
|
|
|
float lightRadius = gLights[i].attRadius;
|