浏览代码

switch some structured buffers to regular buffers

switch some structured buffers to regular buffers
/main
mmikk 8 年前
当前提交
39a9d002
共有 5 个文件被更改,包括 6 次插入7 次删除
  1. 2
      Assets/ScriptableRenderLoop/fptl/RegularForwardLightingUtils.hlsl
  2. 2
      Assets/ScriptableRenderLoop/fptl/TiledLightingUtils.hlsl
  3. 2
      Assets/ScriptableRenderLoop/fptl/lightlistbuild-bigtile.compute
  4. 2
      Assets/ScriptableRenderLoop/fptl/lightlistbuild-clustered.compute
  5. 5
      Assets/ScriptableRenderLoop/fptl/lightlistbuild.compute

2
Assets/ScriptableRenderLoop/fptl/RegularForwardLightingUtils.hlsl


StructuredBuffer<SFiniteLightData> g_vLightData;
StructuredBuffer<uint> g_vLightListMeshInst; // build on CPU if in use. direct lights first, then reflection probes.
Buffer<uint> g_vLightListMeshInst; // build on CPU if in use. direct lights first, then reflection probes.
uniform int g_numLights;
uniform int g_numReflectionProbes;

2
Assets/ScriptableRenderLoop/fptl/TiledLightingUtils.hlsl


StructuredBuffer<SFiniteLightData> g_vLightData;
StructuredBuffer<uint> g_vLightListGlobal;
Buffer<uint> g_vLightListGlobal;
void GetCountAndStartOpaque(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
RWStructuredBuffer<uint> g_vLightList : register( u0 );
RWBuffer<uint> g_vLightList : register( u0 );
// 2kB (room for roughly 30 wavefronts)

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


StructuredBuffer<SFiniteLightBound> g_data : register( t3 );
#ifdef USE_TWO_PASS_TILED_LIGHTING
StructuredBuffer<uint> g_vBigTileLightList : register( t4 );
Buffer<uint> g_vBigTileLightList : register( t4 );
#endif

5
Assets/ScriptableRenderLoop/fptl/lightlistbuild.compute


StructuredBuffer<SFiniteLightBound> g_data : register( t3 );
#ifdef USE_TWO_PASS_TILED_LIGHTING
StructuredBuffer<uint> g_vBigTileLightList : register( t4 );
Buffer<uint> g_vBigTileLightList : register( t4 );
//RWBuffer<uint4> g_vLightList : register( u0 );
RWStructuredBuffer<uint> g_vLightList : register( u0 );
RWBuffer<uint> g_vLightList : register( u0 );
#define MAX_NR_COARSE_ENTRIES 64

正在加载...
取消
保存