|
|
|
|
|
|
UpdatePositionInput(depth, _InvViewProjMatrix, _ViewProjMatrix, posInput); |
|
|
|
|
|
|
|
int2 pixelCoord = posInput.unPositionSS.xy; |
|
|
|
int2 tileCoord = (float2)pixelCoord / TILE_SIZE; |
|
|
|
int2 mouseTileCoord = _MousePixelCoord / TILE_SIZE; |
|
|
|
int2 offsetInTile = pixelCoord - tileCoord * TILE_SIZE; |
|
|
|
int2 tileCoord = (float2)pixelCoord / GetTileSize(); |
|
|
|
int2 mouseTileCoord = _MousePixelCoord / GetTileSize(); |
|
|
|
int2 offsetInTile = pixelCoord - tileCoord * GetTileSize(); |
|
|
|
|
|
|
|
int n = 0; |
|
|
|
#ifdef SHOW_LIGHT_CATEGORIES |
|
|
|
|
|
|
// Tile overlap counter |
|
|
|
if (n >= 0) |
|
|
|
{ |
|
|
|
result = OverlayHeatMap(int2(posInput.unPositionSS.xy) & (TILE_SIZE - 1), n); |
|
|
|
result = OverlayHeatMap(int2(posInput.unPositionSS.xy) & (GetTileSize() - 1), n); |
|
|
|
} |
|
|
|
|
|
|
|
#ifdef SHOW_LIGHT_CATEGORIES |
|
|
|
|
|
|
bool border = any(offsetInTile == 0 || offsetInTile == TILE_SIZE - 1); |
|
|
|
bool border = any(offsetInTile == 0 || offsetInTile == GetTileSize() - 1); |
|
|
|
float4 result2 = float4(1.0, 1.0, 1.0, border ? 1.0 : 0.5); |
|
|
|
result = AlphaBlend(result, result2); |
|
|
|
} |
|
|
|