浏览代码

Fixes to previous commit. GetVisibleRenderersCount() is not yet in main SRP branch, which would cause compiler errors. Value initialized to a constant for now.

/RenderPassXR_Sandbox
Felipe Lira 8 年前
当前提交
12c9973a
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs

10
Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs


context.ExecuteCommandBuffer(cmd);
cmd.Dispose();
if (lightData.isSingleDirectionalLight)
FillLightIndices(ref cullResults, visibleLights.Length);
// Setup light and shadow shader constants
SetupLightShaderVariables(visibleLights, ref cullResults, ref context, ref lightData);
if (shadowsRendered)

private void FillLightIndices(ref CullResults cullResults, int visibleLightsCount)
{
int visibleRenderersCount = cullResults.GetVisibleRenderersCount();
//int visibleRenderersCount = cullResults.GetVisibleRenderersCount();
// TODO: commenting cullResults.GetVisislbeRenderersCount() to avoid compiler errors as it is not in main SRP trunk yet
// For now setting a small amount enough for the test scenes.
int visibleRenderersCount = 1024;
if (visibleRenderersCount > m_LightIndicesCount)
{
m_LightIndicesCount = visibleRenderersCount * visibleLightsCount;

if (!lightData.isSingleDirectionalLight)
{
FillLightIndices(ref cullResults, lights.Length);
Math.Min(kMaxVisibleLights, lights.Length);
maxLights = Math.Min(kMaxVisibleLights, lights.Length);
}
for (int i = 0; i < maxLights; ++i)

正在加载...
取消
保存