浏览代码

turned UsingFptl() into an accessor

/main
vlad-andreev 8 年前
当前提交
95cf033e
共有 1 个文件被更改,包括 11 次插入8 次删除
  1. 19
      Assets/ScriptableRenderLoop/fptl/FptlLighting.cs

19
Assets/ScriptableRenderLoop/fptl/FptlLighting.cs


{
var cmd = new CommandBuffer { name = opaquesOnly ? "Prep Opaques Only Forward Pass" : "Prep Forward Pass" };
bool useFptl = opaquesOnly && UsingFptl(); // requires depth pre-pass for forward opaques!
bool useFptl = opaquesOnly && usingFptl; // requires depth pre-pass for forward opaques!
bool haveTiledSolution = opaquesOnly || enableClustered;
cmd.EnableShaderKeyword(haveTiledSolution ? "TILED_FORWARD" : "REGULAR_FORWARD" );

loop.DrawRenderers(ref settings);
}
bool UsingFptl()
bool usingFptl
bool isEnabledMSAA = false;
Debug.Assert((!isEnabledMSAA) || enableClustered);
bool disableFptl = (disableFptlWhenClustered && enableClustered) || isEnabledMSAA;
return !disableFptl;
get
{
bool isEnabledMSAA = false;
Debug.Assert(!isEnabledMSAA || enableClustered);
bool disableFptl = (disableFptlWhenClustered && enableClustered) || isEnabledMSAA;
return !disableFptl;
}
}
static void CopyDepthAfterGBuffer(RenderLoop loop)

void DoTiledDeferredLighting(Camera camera, RenderLoop loop)
{
var bUseClusteredForDeferred = !UsingFptl(); // doesn't work on reflections yet but will soon
var bUseClusteredForDeferred = !usingFptl; // doesn't work on reflections yet but will soon
var cmd = new CommandBuffer();
m_DeferredMaterial.EnableKeyword(bUseClusteredForDeferred ? "USE_CLUSTERED_LIGHTLIST" : "USE_FPTL_LIGHTLIST");

cmd.DispatchCompute(buildPerBigTileLightListShader, s_GenListPerBigTileKernel, numBigTilesX, numBigTilesY, 1);
}
if( UsingFptl() ) // optimized for opaques only
if( usingFptl ) // optimized for opaques only
{
cmd.SetComputeIntParams(buildPerTileLightListShader, "g_viDimensions", new int[2] { w, h });
cmd.SetComputeIntParam(buildPerTileLightListShader, "g_iNrVisibLights", numLights);

正在加载...
取消
保存