浏览代码

apparently we don't support uniforms in #ifdef in compute with multiple kernels

apparently we don't support uniforms in #ifdef in compute with multiple
kernels (where it's not the same scenario in every kernel)
/main
mmikk 8 年前
当前提交
3a6077b7
共有 2 个文件被更改,包括 15 次插入11 次删除
  1. 22
      Assets/ScriptableRenderLoop/fptl/TiledLightingUtils.hlsl
  2. 4
      Assets/ScriptableRenderLoop/fptl/renderloopfptl.asset

22
Assets/ScriptableRenderLoop/fptl/TiledLightingUtils.hlsl


#include "LightingUtils.hlsl"
// these uniforms are only needed for when OPAQUES_ONLY is NOT defined
// but there's a problem with our front-end compilation of compute shaders with multiple kernels causing it to error
//#ifndef OPAQUES_ONLY
uniform float g_fClustScale;
uniform float g_fClustBase;
uniform float g_fNearPlane;
uniform float g_fFarPlane;
uniform int g_iLog2NumClusters; // We need to always define these to keep constant buffer layouts compatible
uniform uint g_isLogBaseBufferEnabled;
uniform uint g_isOpaquesOnlyEnabled;
//#endif
StructuredBuffer<SFiniteLightData> g_vLightData;
Buffer<uint> g_vLightListGlobal;

#else
uniform float g_fClustScale;
uniform float g_fClustBase;
uniform float g_fNearPlane;
uniform float g_fFarPlane;
uniform int g_iLog2NumClusters; // We need to always define these to keep constant buffer layouts compatible
uniform uint g_isLogBaseBufferEnabled;
uniform uint g_isOpaquesOnlyEnabled;
void GetCountAndStart(out uint uStart, out uint uNrLights, uint2 tileIDX, int nrTilesX, int nrTilesY, float linDepth, uint model)

4
Assets/ScriptableRenderLoop/fptl/renderloopfptl.asset


type: 3}
buildPerVoxelLightListShader: {fileID: 7200000, guid: 4c2d6eb0553e2514bba3ea9a85d8c53c,
type: 3}
enableClustered: 1
disableFptlWhenClustered: 1
enableClustered: 0
disableFptlWhenClustered: 0
enableBigTilePrepass: 1
enableDrawLightBoundsDebug: 0
enableDrawTileDebug: 0
正在加载...
取消
保存