浏览代码

switch to structured across the board

switch to structured across the board
/Branch_Batching2
mmikk 8 年前
当前提交
e8505d17
共有 8 个文件被更改,包括 22 次插入22 次删除
  1. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild-bigtile.compute
  2. 10
      Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild-clustered.compute
  3. 4
      Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild.compute
  4. 6
      Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePass.hlsl
  5. 6
      Assets/ScriptableRenderLoop/fptl/TiledLightingUtils.hlsl
  6. 2
      Assets/ScriptableRenderLoop/fptl/lightlistbuild-bigtile.compute
  7. 10
      Assets/ScriptableRenderLoop/fptl/lightlistbuild-clustered.compute
  8. 4
      Assets/ScriptableRenderLoop/fptl/lightlistbuild.compute

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild-bigtile.compute


#define NR_THREADS 64
// output buffer
RWBuffer<uint> g_vLightList : register( u0 );
RWStructuredBuffer<uint> g_vLightList : register( u0 ); // don't support RWBuffer yet in unity
// 2kB (room for roughly 30 wavefronts)

10
Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild-clustered.compute


StructuredBuffer<SFiniteLightBound> g_data : register( t3 );
#ifdef USE_TWO_PASS_TILED_LIGHTING
Buffer<uint> g_vBigTileLightList : register( t4 );
StructuredBuffer<uint> g_vBigTileLightList : register( t4 ); // don't support Buffer yet in unity
#endif

RWBuffer<uint> g_vLayeredLightList : register( u0 );
RWBuffer<uint> g_LayeredOffset : register( u1 );
RWBuffer<uint> g_LayeredSingleIdxBuffer : register( u2 );
RWStructuredBuffer<uint> g_vLayeredLightList : register( u0 ); // don't support RWBuffer yet in unity
RWStructuredBuffer<uint> g_LayeredOffset : register( u1 ); // don't support RWBuffer yet in unity
RWStructuredBuffer<uint> g_LayeredSingleIdxBuffer : register( u2 ); // don't support RWBuffer yet in unity
RWBuffer<float> g_logBaseBuffer : register( u3 );
RWStructuredBuffer<float> g_logBaseBuffer : register( u3 ); // don't support RWBuffer yet in unity
#endif

4
Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/Resources/lightlistbuild.compute


StructuredBuffer<SFiniteLightBound> g_data : register( t3 );
#ifdef USE_TWO_PASS_TILED_LIGHTING
Buffer<uint> g_vBigTileLightList : register( t4 );
StructuredBuffer<uint> g_vBigTileLightList : register( t4 ); // don't support Buffer yet in unity
RWBuffer<uint> g_vLightList : register( u0 );
RWStructuredBuffer<uint> g_vLightList : register( u0 ); // don't support RWBuffer yet in unity
#define MAX_NR_COARSE_ENTRIES 64

6
Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePass.hlsl


uint _NumTileX;
uint _NumTileY;
Buffer<uint> g_vLightListGlobal;
StructuredBuffer<uint> g_vLightListGlobal; // don't support Buffer yet in unity
#define TILE_SIZE 16 // This is fixed
#define DWORD_PER_TILE 16 // See dwordsPerTile in TilePass.cs, we have roomm for 31 lights and a number of light value all store on 16 bit (ushort)

//#endif
//#ifdef USE_CLUSTERED_LIGHTLIST
Buffer<uint> g_vLayeredOffsetsBuffer;
Buffer<float> g_logBaseBuffer;
StructuredBuffer<uint> g_vLayeredOffsetsBuffer; // don't support Buffer yet in unity
StructuredBuffer<float> g_logBaseBuffer; // don't support Buffer yet in unity
//#endif
StructuredBuffer<DirectionalLightData> _DirectionalLightDatas;

6
Assets/ScriptableRenderLoop/fptl/TiledLightingUtils.hlsl


StructuredBuffer<SFiniteLightData> g_vLightData;
Buffer<uint> g_vLightListGlobal;
StructuredBuffer<uint> g_vLightListGlobal; // don't support Buffer yet in unity
void GetCountAndStartOpaque(out uint uStart, out uint uNrLights, uint2 tileIDX, int nrTilesX, int nrTilesY, float linDepth, uint model)

#include "ClusteredUtils.h"
Buffer<uint> g_vLayeredOffsetsBuffer;
Buffer<float> g_logBaseBuffer;
StructuredBuffer<uint> g_vLayeredOffsetsBuffer; // don't support Buffer yet in unity
StructuredBuffer<float> g_logBaseBuffer; // don't support Buffer yet in unity
void GetCountAndStart(out uint uStart, out uint uNrLights, uint2 tileIDX, int nrTilesX, int nrTilesY, float linDepth, uint model)

2
Assets/ScriptableRenderLoop/fptl/lightlistbuild-bigtile.compute


#define NR_THREADS 64
// output buffer
RWBuffer<uint> g_vLightList : register( u0 );
RWStructuredBuffer<uint> g_vLightList : register( u0 ); // don't support RWBuffer yet in unity
// 2kB (room for roughly 30 wavefronts)

10
Assets/ScriptableRenderLoop/fptl/lightlistbuild-clustered.compute


StructuredBuffer<SFiniteLightBound> g_data : register( t3 );
#ifdef USE_TWO_PASS_TILED_LIGHTING
Buffer<uint> g_vBigTileLightList : register( t4 );
StructuredBuffer<uint> g_vBigTileLightList : register( t4 ); // don't support Buffer yet in unity
#endif

RWBuffer<uint> g_vLayeredLightList : register( u0 );
RWBuffer<uint> g_LayeredOffset : register( u1 );
RWBuffer<uint> g_LayeredSingleIdxBuffer : register( u2 );
RWStructuredBuffer<uint> g_vLayeredLightList : register( u0 ); // don't support RWBuffer yet in unity
RWStructuredBuffer<uint> g_LayeredOffset : register( u1 ); // don't support RWBuffer yet in unity
RWStructuredBuffer<uint> g_LayeredSingleIdxBuffer : register( u2 ); // don't support RWBuffer yet in unity
RWBuffer<float> g_logBaseBuffer : register( u3 );
RWStructuredBuffer<float> g_logBaseBuffer : register( u3 ); // don't support RWBuffer yet in unity
#endif

4
Assets/ScriptableRenderLoop/fptl/lightlistbuild.compute


StructuredBuffer<SFiniteLightBound> g_data : register( t3 );
#ifdef USE_TWO_PASS_TILED_LIGHTING
Buffer<uint> g_vBigTileLightList : register( t4 );
StructuredBuffer<uint> g_vBigTileLightList : register( t4 ); // don't support Buffer yet in unity
RWBuffer<uint> g_vLightList : register( u0 );
RWStructuredBuffer<uint> g_vLightList : register( u0 ); // don't support RWBuffer yet in unity
#define MAX_NR_COARSE_ENTRIES 64

正在加载...
取消
保存