{
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
Debug.Assert(!isEnabledMSAA || enableClustered);
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);