浏览代码

Don't affect transparent pass - we know they are cluster

/Reduce-shader-variant
sebastienlagarde 7 年前
当前提交
a3ac5cb1
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoopDef.hlsl

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoopDef.hlsl


uint GetTileSize()
{
#ifndef _SURFACE_TYPE_TRANSPARENT // Transparent are always using cluster
#endif
return TILE_SIZE_CLUSTERED;
}

void GetCountAndStart(PositionInputs posInput, uint lightCategory, out uint start, out uint lightCount)
{
#ifndef _SURFACE_TYPE_TRANSPARENT // Transparent are always using cluster
#endif
#ifndef _SURFACE_TYPE_TRANSPARENT // Transparent are always using cluster
uint offset = tileOffset + lightIndex;
const uint lightIndexPlusOne = lightIndex + 1; // Add +1 as first slot is reserved to store number of light

// Light index are store on 16bit
return (_UseTileLightList ? ((value >> ((lightIndexPlusOne & 1) * DWORD_PER_TILE)) & 0xffff) : value);
#else
return g_vLightListGlobal[tileOffset + lightIndex];
#endif
}
#endif // USE_FPTL_LIGHTLIST

正在加载...
取消
保存