public static int USE_LEFTHAND_CAMERASPACE = 1 ;
public static int TILE_SIZE_FPTL = 1 6 ;
public static int TILE_SIZE_CLUSTERED = 1 6 ;
public static int TILE_SIZE_CLUSTERED = 3 2 ;
// flags
public static int IS_CIRCULAR_SPOT_SHAPE = 1 ;
{
var nrClustersX = ( width + LightDefinitions . TILE_SIZE_CLUSTERED - 1 ) / LightDefinitions . TILE_SIZE_CLUSTERED ;
var nrClustersY = ( height + LightDefinitions . TILE_SIZE_CLUSTERED - 1 ) / LightDefinitions . TILE_SIZE_CLUSTERED ;
var nrClusters = nrClustersX * nrClustersY ;
var nrClusterTile s = nrClustersX * nrClustersY ;
s_PerVoxelOffset = new ComputeBuffer ( ( int ) LightCategory . Count * ( 1 < < k_Log2NumClusters ) * nrClusters , sizeof ( uint ) ) ;
s_PerVoxelLightLists = new ComputeBuffer ( NumLightIndicesPerClusteredTile ( ) * nrClusters , sizeof ( uint ) ) ;
s_PerVoxelOffset = new ComputeBuffer ( ( int ) LightCategory . Count * ( 1 < < k_Log2NumClusters ) * nrClusterTile s , sizeof ( uint ) ) ;
s_PerVoxelLightLists = new ComputeBuffer ( NumLightIndicesPerClusteredTile ( ) * nrClusterTile s , sizeof ( uint ) ) ;
s_PerTileLogBaseTweak = new ComputeBuffer ( nrTiles , sizeof ( float ) ) ;
s_PerTileLogBaseTweak = new ComputeBuffer ( nrCluster Tiles , sizeof ( float ) ) ;
}
}
// Since we need the stencil test, the compute path does not currently support SSS.
cmd . SetComputeTextureParam ( shadeOpaqueShader , kernel , "combinedLightingUAV" , colorBuffers [ 0 ] ) ;
// always do deferred lighting in blocks of 16x16 (not same as tiled light size)
int numTilesX = bUseClusteredForDeferred ? GetNumTileClusteredX ( camera ) : GetNumTileFtplX ( camera ) ;
int numTilesY = bUseClusteredForDeferred ? GetNumTileClusteredY ( camera ) : GetNumTileFtplY ( camera ) ;
int numTilesX = ( w + 1 5 ) / 1 6 ;
int numTilesY = ( h + 1 5 ) / 1 6 ;
cmd . DispatchCompute ( shadeOpaqueShader , kernel , numTilesX , numTilesY , 1 ) ;
}
else