浏览代码

Frame configuration setup

/main
John 7 年前
当前提交
3943e216
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 11
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

11
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


context.SetupCameraProperties(m_CurrCamera, stereoEnabled);
if (LightweightUtils.HasFlag(frameRenderingConfiguration, FrameRenderingConfiguration.DepthPrePass))
{
//TODO: Shadow Gather Here
//NOTE: Enable Depth PrePass flag based on SS Shadow Checkbox and then check for that again here?
CollectShadowPass(ref context);
if(m_Asset.UsesScreenSpaceShadows) //NOTE: Should this be added to the FrameRenderingConfiguration?
ShadowCollectPass(ref context);
}
ForwardPass(visibleLights, frameRenderingConfiguration, ref context, ref lightData, stereoEnabled);

return corners;
}
private void CollectShadowPass(ref ScriptableRenderContext context)
private void ShadowCollectPass(ref ScriptableRenderContext context)
{
CommandBuffer cmd = CommandBufferPool.Get("Collect Shadows");
cmd.GetTemporaryRT(m_ScreenSpaceShadowMapRTID, m_CurrCamera.pixelWidth, m_CurrCamera.pixelHeight, 0, FilterMode.Bilinear, RenderTextureFormat.R8);

CoreUtils.SetKeyword(cmd, "_MIXED_LIGHTING_SUBTRACTIVE", m_MixedLightingSetup == MixedLightingSetup.Subtractive);
CoreUtils.SetKeyword(cmd, "_VERTEX_LIGHTS", vertexLightsCount > 0);
CoreUtils.SetKeyword(cmd, "SOFTPARTICLES_ON", m_RequireDepthTexture && m_Asset.RequireSoftParticles);
CoreUtils.SetKeyword(cmd, "_SCREEN_SPACE_SHADOWS", m_RequireDepthTexture && m_Asset.UsesScreenSpaceShadows);
bool linearFogModeEnabled = false;
bool exponentialFogModeEnabled = false;

正在加载...
取消
保存