浏览代码

HDRenderLoop: Rename renderLoop to renderContext

/main
sebastienlagarde 8 年前
当前提交
cb97b488
共有 17 个文件被更改,包括 212 次插入210 次删除
  1. 6
      Assets/BasicRenderLoopTutorial/BasicRenderLoop.cs
  2. 2
      Assets/Editor/Tests/RenderloopTests/CullResultsTest.cs
  3. 12
      Assets/Editor/Tests/RenderloopTests/RenderloopTestFixture.cs
  4. 42
      Assets/ScriptableRenderLoop/HDRenderPipeline/Editor/HDRenderLoopInspector.cs
  5. 192
      Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderLoop.cs
  6. 4
      Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/LightLoop.cs
  7. 12
      Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePass.cs
  8. 4
      Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Lit.cs
  9. 26
      Assets/ScriptableRenderLoop/HDRenderPipeline/SceneSettings/CommonSettings.cs
  10. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/HDRISky/HDRISkyRenderer.cs
  11. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/ProceduralSky/ProceduralSkyRenderer.cs
  12. 40
      Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/SkyManager.cs
  13. 18
      Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/SkyParameters.cs
  14. 42
      Assets/ScriptableRenderLoop/HDRenderPipeline/Utilities.cs
  15. 8
      Assets/ScriptableRenderLoop/fptl/FptlLighting.cs
  16. 10
      ProjectSettings/GraphicsSettings.asset

6
Assets/BasicRenderLoopTutorial/BasicRenderLoop.cs


public class BasicRenderLoopInstance : RenderPipeline
{
public override void Render(ScriptableRenderContext renderLoop, Camera[] cameras)
public override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
base.Render(renderLoop, cameras);
BasicRendering.Render(renderLoop, cameras);
base.Render(renderContext, cameras);
BasicRendering.Render(renderContext, cameras);
}
}

2
Assets/Editor/Tests/RenderloopTests/CullResultsTest.cs


[TestFixture]
public class CullResultsTest
{
void InspectCullResults(Camera camera, CullResults cullResults, ScriptableRenderContext renderLoop)
void InspectCullResults(Camera camera, CullResults cullResults, ScriptableRenderContext renderContext)
{
VisibleReflectionProbe[] probes = cullResults.visibleReflectionProbes;

12
Assets/Editor/Tests/RenderloopTests/RenderloopTestFixture.cs


public class RenderLoopTestFixtureInstance : RenderPipeline
{
public delegate void TestDelegate(Camera camera, CullResults cullResults, ScriptableRenderContext renderLoop);
public delegate void TestDelegate(Camera camera, CullResults cullResults, ScriptableRenderContext renderContext);
public override void Render(ScriptableRenderContext renderLoop, Camera[] cameras)
public override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
base.Render(renderLoop, cameras);
base.Render(renderContext, cameras);
foreach (var camera in cameras)
{

bool gotCullingParams = CullResults.GetCullingParameters(camera, out cullingParams);
Assert.IsTrue(gotCullingParams);
CullResults cullResults = CullResults.Cull(ref cullingParams, renderLoop);
CullResults cullResults = CullResults.Cull(ref cullingParams, renderContext);
s_Callback(camera, cullResults, renderLoop);
s_Callback(camera, cullResults, renderContext);
renderLoop.Submit();
renderContext.Submit();
}
public static void Run(TestDelegate renderCallback)

42
Assets/ScriptableRenderLoop/HDRenderPipeline/Editor/HDRenderLoopInspector.cs


}
}
private void DebugParametersUI(HDRenderPipeline renderLoop)
private void DebugParametersUI(HDRenderPipeline renderContext)
var debugParameters = renderLoop.debugParameters;
var debugParameters = renderContext.debugParameters;
EditorGUILayout.LabelField(styles.debugParameters);
EditorGUI.indentLevel++;

if (EditorGUI.EndChangeCheck())
{
EditorUtility.SetDirty(renderLoop); // Repaint
EditorUtility.SetDirty(renderContext); // Repaint
private void ShadowParametersUI(HDRenderPipeline renderLoop)
private void ShadowParametersUI(HDRenderPipeline renderContext)
var shadowParameters = renderLoop.shadowSettings;
var shadowParameters = renderContext.shadowSettings;
EditorGUILayout.LabelField(styles.shadowSettings);
EditorGUI.indentLevel++;

if (EditorGUI.EndChangeCheck())
{
EditorUtility.SetDirty(renderLoop); // Repaint
EditorUtility.SetDirty(renderContext); // Repaint
private void TextureParametersUI(HDRenderPipeline renderLoop)
private void TextureParametersUI(HDRenderPipeline renderContext)
var textureParameters = renderLoop.textureSettings;
var textureParameters = renderContext.textureSettings;
EditorGUILayout.LabelField(styles.textureSettings);
EditorGUI.indentLevel++;

if (EditorGUI.EndChangeCheck())
{
renderLoop.textureSettings = textureParameters;
EditorUtility.SetDirty(renderLoop); // Repaint
renderContext.textureSettings = textureParameters;
EditorUtility.SetDirty(renderContext); // Repaint
private void TilePassUI(HDRenderPipeline renderLoop)
private void TilePassUI(HDRenderPipeline renderContext)
TilePass.LightLoop tilePass = renderLoop.lightLoop as TilePass.LightLoop;
TilePass.LightLoop tilePass = renderContext.lightLoop as TilePass.LightLoop;
if (tilePass != null)
{
EditorGUILayout.LabelField(styles.tileLightLoopSettings);

if (EditorGUI.EndChangeCheck())
{
EditorUtility.SetDirty(renderLoop); // Repaint
EditorUtility.SetDirty(renderContext); // Repaint
renderLoop.DestroyCreatedInstances();
renderContext.DestroyCreatedInstances();
}
EditorGUI.BeginChangeCheck();

if (EditorGUI.EndChangeCheck())
{
EditorUtility.SetDirty(renderLoop); // Repaint
EditorUtility.SetDirty(renderContext); // Repaint
UnityEditorInternal.InternalEditorUtility.RepaintAllViews();
}
EditorGUI.indentLevel--;

public override void OnInspectorGUI()
{
var renderLoop = target as HDRenderPipeline;
var renderContext = target as HDRenderPipeline;
if (!renderLoop)
if (!renderContext)
DebugParametersUI(renderLoop);
ShadowParametersUI(renderLoop);
TextureParametersUI(renderLoop);
TilePassUI(renderLoop);
DebugParametersUI(renderContext);
ShadowParametersUI(renderContext);
TextureParametersUI(renderContext);
TilePassUI(renderContext);
}
}
}

192
Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderLoop.cs


UnityEngine.Rendering.GraphicsSettings.lightsUseCCT = previousLightsUseCCT;
}
void InitAndClearBuffer(Camera camera, ScriptableRenderContext renderLoop)
void InitAndClearBuffer(Camera camera, ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("InitAndClearBuffer", renderLoop))
using (new Utilities.ProfilingSample("InitAndClearBuffer", renderContext))
using (new Utilities.ProfilingSample("InitGBuffers and clear Depth/Stencil", renderLoop))
using (new Utilities.ProfilingSample("InitGBuffers and clear Depth/Stencil", renderContext))
{
var cmd = new CommandBuffer();
cmd.name = "";

// Also we manage ourself the HDR format, here allocating fp16 directly.
// With scriptable render loop we can allocate temporary RT in a command buffer, they will not be release with ExecuteCommandBuffer
// These temporary surface are release automatically at the end of the scriptable renderloop if not release explicitly
// These temporary surface are release automatically at the end of the scriptable render pipeline if not release explicitly
int w = camera.pixelWidth;
int h = camera.pixelHeight;

{
m_gbufferManager.InitGBuffers(w, h, cmd);
}
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
Utilities.SetRenderTarget(renderLoop, m_CameraColorBufferRT, m_CameraDepthBufferRT, ClearFlag.ClearDepth);
Utilities.SetRenderTarget(renderContext, m_CameraColorBufferRT, m_CameraDepthBufferRT, ClearFlag.ClearDepth);
using (new Utilities.ProfilingSample("Clear HDR target", renderLoop))
using (new Utilities.ProfilingSample("Clear HDR target", renderContext))
Utilities.SetRenderTarget(renderLoop, m_CameraColorBufferRT, m_CameraDepthBufferRT, ClearFlag.ClearColor, Color.black);
Utilities.SetRenderTarget(renderContext, m_CameraColorBufferRT, m_CameraDepthBufferRT, ClearFlag.ClearColor, Color.black);
using (new Utilities.ProfilingSample("Clear GBuffer", renderLoop))
using (new Utilities.ProfilingSample("Clear GBuffer", renderContext))
Utilities.SetRenderTarget(renderLoop, m_gbufferManager.GetGBuffers(), m_CameraDepthBufferRT, ClearFlag.ClearColor, Color.black);
Utilities.SetRenderTarget(renderContext, m_gbufferManager.GetGBuffers(), m_CameraDepthBufferRT, ClearFlag.ClearColor, Color.black);
}
// END TEMP

void RenderOpaqueRenderList(CullResults cull, Camera camera, ScriptableRenderContext renderLoop, string passName, RendererConfiguration rendererConfiguration = 0)
void RenderOpaqueRenderList(CullResults cull, Camera camera, ScriptableRenderContext renderContext, string passName, RendererConfiguration rendererConfiguration = 0)
{
if (!debugParameters.displayOpaqueObjects)
return;

sorting = { flags = SortFlags.CommonOpaque }
};
settings.inputFilter.SetQueuesOpaque();
renderLoop.DrawRenderers(ref settings);
renderContext.DrawRenderers(ref settings);
void RenderTransparentRenderList(CullResults cull, Camera camera, ScriptableRenderContext renderLoop, string passName, RendererConfiguration rendererConfiguration = 0)
void RenderTransparentRenderList(CullResults cull, Camera camera, ScriptableRenderContext renderContext, string passName, RendererConfiguration rendererConfiguration = 0)
{
if (!debugParameters.displayTransparentObjects)
return;

sorting = { flags = SortFlags.CommonTransparent }
};
settings.inputFilter.SetQueuesTransparent();
renderLoop.DrawRenderers(ref settings);
renderContext.DrawRenderers(ref settings);
void RenderDepthPrepass(CullResults cull, Camera camera, ScriptableRenderContext renderLoop)
void RenderDepthPrepass(CullResults cull, Camera camera, ScriptableRenderContext renderContext)
{
// If we are forward only we will do a depth prepass
// TODO: Depth prepass should be enabled based on light loop settings. LightLoop define if they need a depth prepass + forward only...

using (new Utilities.ProfilingSample("Depth Prepass", renderLoop))
using (new Utilities.ProfilingSample("Depth Prepass", renderContext))
Utilities.SetRenderTarget(renderLoop, m_CameraDepthBufferRT);
RenderOpaqueRenderList(cull, camera, renderLoop, "DepthOnly");
Utilities.SetRenderTarget(renderContext, m_CameraDepthBufferRT);
RenderOpaqueRenderList(cull, camera, renderContext, "DepthOnly");
void RenderGBuffer(CullResults cull, Camera camera, ScriptableRenderContext renderLoop)
void RenderGBuffer(CullResults cull, Camera camera, ScriptableRenderContext renderContext)
{
if (debugParameters.useForwardRenderingOnly)
{

using (new Utilities.ProfilingSample("GBuffer Pass", renderLoop))
using (new Utilities.ProfilingSample("GBuffer Pass", renderContext))
Utilities.SetRenderTarget(renderLoop, m_gbufferManager.GetGBuffers(), m_CameraDepthBufferRT);
Utilities.SetRenderTarget(renderContext, m_gbufferManager.GetGBuffers(), m_CameraDepthBufferRT);
RenderOpaqueRenderList(cull, camera, renderLoop, "GBuffer", Utilities.kRendererConfigurationBakedLighting);
RenderOpaqueRenderList(cull, camera, renderContext, "GBuffer", Utilities.kRendererConfigurationBakedLighting);
void RenderForwardOnlyDepthPrepass(CullResults cull, Camera camera, ScriptableRenderContext renderLoop)
void RenderForwardOnlyDepthPrepass(CullResults cull, Camera camera, ScriptableRenderContext renderContext)
{
// If we are forward only we don't need to render ForwardOpaqueDepth object
// But in case we request a prepass we render it

using (new Utilities.ProfilingSample("Forward opaque depth", renderLoop))
using (new Utilities.ProfilingSample("Forward opaque depth", renderContext))
Utilities.SetRenderTarget(renderLoop, m_CameraDepthBufferRT);
RenderOpaqueRenderList(cull, camera, renderLoop, "ForwardOnlyDepthOnly");
Utilities.SetRenderTarget(renderContext, m_CameraDepthBufferRT);
RenderOpaqueRenderList(cull, camera, renderContext, "ForwardOnlyDepthOnly");
void RenderDebugViewMaterial(CullResults cull, HDCamera hdCamera, ScriptableRenderContext renderLoop)
void RenderDebugViewMaterial(CullResults cull, HDCamera hdCamera, ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("DebugView Material Mode Pass", renderLoop))
using (new Utilities.ProfilingSample("DebugView Material Mode Pass", renderContext))
Utilities.SetRenderTarget(renderLoop, m_CameraColorBufferRT, m_CameraDepthBufferRT, Utilities.kClearAll, Color.black);
Utilities.SetRenderTarget(renderContext, m_CameraColorBufferRT, m_CameraDepthBufferRT, Utilities.kClearAll, Color.black);
RenderOpaqueRenderList(cull, hdCamera.camera, renderLoop, "DebugViewMaterial");
RenderOpaqueRenderList(cull, hdCamera.camera, renderContext, "DebugViewMaterial");
}
// Render GBuffer opaque

// TODO: Bind depth textures
var cmd = new CommandBuffer { name = "GBuffer Debug Pass" };
cmd.Blit(null, m_CameraColorBufferRT, m_DebugViewMaterialGBuffer, 0);
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
RenderTransparentRenderList(cull, hdCamera.camera, renderLoop, "DebugViewMaterial");
RenderTransparentRenderList(cull, hdCamera.camera, renderContext, "DebugViewMaterial");
}
// Last blit

renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
void RenderDeferredLighting(HDCamera hdCamera, ScriptableRenderContext renderLoop)
void RenderDeferredLighting(HDCamera hdCamera, ScriptableRenderContext renderContext)
{
if (debugParameters.useForwardRenderingOnly)
{

// Bind material data
m_LitRenderLoop.Bind();
m_lightLoop.RenderDeferredLighting(hdCamera, renderLoop, m_CameraColorBuffer);
m_lightLoop.RenderDeferredLighting(hdCamera, renderContext, m_CameraColorBuffer);
void UpdateSkyEnvironment(HDCamera hdCamera, ScriptableRenderContext renderLoop)
void UpdateSkyEnvironment(HDCamera hdCamera, ScriptableRenderContext renderContext)
m_SkyManager.UpdateEnvironment(hdCamera, m_lightLoop.GetCurrentSunLight(), renderLoop);
m_SkyManager.UpdateEnvironment(hdCamera, m_lightLoop.GetCurrentSunLight(), renderContext);
void RenderSky(HDCamera hdCamera, ScriptableRenderContext renderLoop)
void RenderSky(HDCamera hdCamera, ScriptableRenderContext renderContext)
m_SkyManager.RenderSky(hdCamera, m_lightLoop.GetCurrentSunLight(), m_CameraColorBufferRT, m_CameraDepthBufferRT, renderLoop);
m_SkyManager.RenderSky(hdCamera, m_lightLoop.GetCurrentSunLight(), m_CameraColorBufferRT, m_CameraDepthBufferRT, renderContext);
void RenderForward(CullResults cullResults, Camera camera, ScriptableRenderContext renderLoop, bool renderOpaque)
void RenderForward(CullResults cullResults, Camera camera, ScriptableRenderContext renderContext, bool renderOpaque)
{
// TODO: Currently we can't render opaque object forward when deferred is enabled
// miss option

using (new Utilities.ProfilingSample("Forward Pass", renderLoop))
using (new Utilities.ProfilingSample("Forward Pass", renderContext))
Utilities.SetRenderTarget(renderLoop, m_CameraColorBufferRT, m_CameraDepthBufferRT);
Utilities.SetRenderTarget(renderContext, m_CameraColorBufferRT, m_CameraDepthBufferRT);
m_lightLoop.RenderForward(camera, renderLoop, renderOpaque);
m_lightLoop.RenderForward(camera, renderContext, renderOpaque);
RenderOpaqueRenderList(cullResults, camera, renderLoop, "Forward");
RenderOpaqueRenderList(cullResults, camera, renderContext, "Forward");
RenderTransparentRenderList(cullResults, camera, renderLoop, "Forward", Utilities.kRendererConfigurationBakedLighting);
RenderTransparentRenderList(cullResults, camera, renderContext, "Forward", Utilities.kRendererConfigurationBakedLighting);
}
}
}

void RenderForwardOnly(CullResults cullResults, Camera camera, ScriptableRenderContext renderLoop)
void RenderForwardOnly(CullResults cullResults, Camera camera, ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("Forward Only Pass", renderLoop))
using (new Utilities.ProfilingSample("Forward Only Pass", renderContext))
Utilities.SetRenderTarget(renderLoop, m_CameraColorBufferRT, m_CameraDepthBufferRT);
Utilities.SetRenderTarget(renderContext, m_CameraColorBufferRT, m_CameraDepthBufferRT);
m_lightLoop.RenderForward(camera, renderLoop, true);
RenderOpaqueRenderList(cullResults, camera, renderLoop, "ForwardOnly");
m_lightLoop.RenderForward(camera, renderContext, true);
RenderOpaqueRenderList(cullResults, camera, renderContext, "ForwardOnly");
void RenderForwardUnlit(CullResults cullResults, Camera camera, ScriptableRenderContext renderLoop)
void RenderForwardUnlit(CullResults cullResults, Camera camera, ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("Forward Unlit Pass", renderLoop))
using (new Utilities.ProfilingSample("Forward Unlit Pass", renderContext))
Utilities.SetRenderTarget(renderLoop, m_CameraColorBufferRT, m_CameraDepthBufferRT);
RenderOpaqueRenderList(cullResults, camera, renderLoop, "ForwardUnlit");
RenderTransparentRenderList(cullResults, camera, renderLoop, "ForwardUnlit");
Utilities.SetRenderTarget(renderContext, m_CameraColorBufferRT, m_CameraDepthBufferRT);
RenderOpaqueRenderList(cullResults, camera, renderContext, "ForwardUnlit");
RenderTransparentRenderList(cullResults, camera, renderContext, "ForwardUnlit");
void RenderVelocity(CullResults cullResults, Camera camera, ScriptableRenderContext renderLoop)
void RenderVelocity(CullResults cullResults, Camera camera, ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("Velocity Pass", renderLoop))
using (new Utilities.ProfilingSample("Velocity Pass", renderContext))
{
// If opaque velocity have been render during GBuffer no need to render it here
if ((ShaderConfig.s_VelocityInGbuffer == 0) || debugParameters.useForwardRenderingOnly)

var cmd = new CommandBuffer { name = "" };
cmd.GetTemporaryRT(m_VelocityBuffer, w, h, 0, FilterMode.Point, Builtin.RenderLoop.GetVelocityBufferFormat(), Builtin.RenderLoop.GetVelocityBufferReadWrite());
cmd.SetRenderTarget(m_VelocityBufferRT, m_CameraDepthBufferRT);
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
RenderOpaqueRenderList(cullResults, camera, renderLoop, "MotionVectors");
RenderOpaqueRenderList(cullResults, camera, renderContext, "MotionVectors");
void RenderDistortion(CullResults cullResults, Camera camera, ScriptableRenderContext renderLoop)
void RenderDistortion(CullResults cullResults, Camera camera, ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("Distortion Pass", renderLoop))
using (new Utilities.ProfilingSample("Distortion Pass", renderContext))
{
int w = camera.pixelWidth;
int h = camera.pixelHeight;

cmd.SetRenderTarget(m_DistortionBufferRT, m_CameraDepthBufferRT);
cmd.ClearRenderTarget(false, true, Color.black); // TODO: can we avoid this clear for performance ?
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
RenderTransparentRenderList(cullResults, camera, renderLoop, "DistortionVectors");
RenderTransparentRenderList(cullResults, camera, renderContext, "DistortionVectors");
void FinalPass(ScriptableRenderContext renderLoop)
void FinalPass(ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("Final Pass", renderLoop))
using (new Utilities.ProfilingSample("Final Pass", renderContext))
{
// Those could be tweakable for the neutral tonemapper, but in the case of the LookDev we don't need that
const float blackIn = 0.02f;

// Resolve our HDR texture to CameraTarget.
cmd.Blit(m_CameraColorBufferRT, BuiltinRenderTextureType.CameraTarget, m_FinalPassMaterial, 0);
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}
}

}
}
public void PushGlobalParams(HDCamera hdCamera, ScriptableRenderContext renderLoop)
public void PushGlobalParams(HDCamera hdCamera, ScriptableRenderContext renderContext)
{
if (m_SkyManager.IsSkyValid())
{

cmd.SetGlobalMatrix("_ViewProjMatrix", hdCamera.viewProjectionMatrix);
cmd.SetGlobalMatrix("_InvViewProjMatrix", hdCamera.invViewProjectionMatrix);
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
m_lightLoop.PushGlobalParams(hdCamera.camera, renderLoop);
m_lightLoop.PushGlobalParams(hdCamera.camera, renderContext);
}
void UpdateCommonSettings()

}
}
public void Render(ScriptableRenderContext renderLoop, IEnumerable<Camera> cameras)
public void Render(ScriptableRenderContext renderContext, IEnumerable<Camera> cameras)
m_LitRenderLoop.RenderInit(renderLoop);
m_LitRenderLoop.RenderInit(renderContext);
}
// Do anything we need to do upon a new frame.

m_ShadowPass.UpdateCullingParameters(ref cullingParams);
var cullResults = CullResults.Cull(ref cullingParams, renderLoop);
var cullResults = CullResults.Cull(ref cullingParams, renderContext);
renderLoop.SetupCameraProperties(camera);
renderContext.SetupCameraProperties(camera);
InitAndClearBuffer(camera, renderLoop);
InitAndClearBuffer(camera, renderContext);
RenderDepthPrepass(cullResults, camera, renderLoop);
RenderDepthPrepass(cullResults, camera, renderContext);
RenderForwardOnlyDepthPrepass(cullResults, camera, renderLoop);
RenderGBuffer(cullResults, camera, renderLoop);
RenderForwardOnlyDepthPrepass(cullResults, camera, renderContext);
RenderGBuffer(cullResults, camera, renderContext);
RenderDebugViewMaterial(cullResults, hdCamera, renderLoop);
RenderDebugViewMaterial(cullResults, hdCamera, renderContext);
using (new Utilities.ProfilingSample("Shadow Pass", renderLoop))
using (new Utilities.ProfilingSample("Shadow Pass", renderContext))
m_ShadowPass.Render(renderLoop, cullResults, out shadows);
m_ShadowPass.Render(renderContext, cullResults, out shadows);
renderLoop.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render
renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render
using (new Utilities.ProfilingSample("Build Light list", renderLoop))
using (new Utilities.ProfilingSample("Build Light list", renderContext))
m_lightLoop.BuildGPULightLists(camera, renderLoop, m_CameraDepthBufferRT);
m_lightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthBufferRT);
PushGlobalParams(hdCamera, renderLoop);
PushGlobalParams(hdCamera, renderContext);
UpdateSkyEnvironment(hdCamera, renderLoop);
UpdateSkyEnvironment(hdCamera, renderContext);
RenderDeferredLighting(hdCamera, renderLoop);
RenderDeferredLighting(hdCamera, renderContext);
RenderForward(cullResults, camera, renderLoop, true);
RenderForwardOnly(cullResults, camera, renderLoop);
RenderForward(cullResults, camera, renderContext, true);
RenderForwardOnly(cullResults, camera, renderContext);
RenderSky(hdCamera, renderLoop);
RenderSky(hdCamera, renderContext);
RenderForward(cullResults, camera, renderLoop, false);
RenderForward(cullResults, camera, renderContext, false);
RenderForwardUnlit(cullResults, camera, renderLoop);
RenderForwardUnlit(cullResults, camera, renderContext);
RenderVelocity(cullResults, camera, renderLoop); // Note we may have to render velocity earlier if we do temporalAO, temporal volumetric etc... Mean we will not take into account forward opaque in case of deferred rendering ?
RenderVelocity(cullResults, camera, renderContext); // Note we may have to render velocity earlier if we do temporalAO, temporal volumetric etc... Mean we will not take into account forward opaque in case of deferred rendering ?
RenderDistortion(cullResults, camera, renderLoop);
RenderDistortion(cullResults, camera, renderContext);
FinalPass(renderLoop);
FinalPass(renderContext);
}
// bind depth surface for editor grid/gizmo/selection rendering

cmd.SetRenderTarget(BuiltinRenderTextureType.CameraTarget, m_CameraDepthBufferRT);
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
renderLoop.Submit();
renderContext.Submit();
}
// Post effects

4
Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/LightLoop.cs


public virtual void PushGlobalParams(Camera camera, ScriptableRenderContext loop) {}
public virtual void RenderDeferredLighting(HDRenderPipeline.HDCamera hdCamera, ScriptableRenderContext renderLoop, RenderTargetIdentifier cameraColorBufferRT) {}
public virtual void RenderDeferredLighting(HDRenderPipeline.HDCamera hdCamera, ScriptableRenderContext renderContext, RenderTargetIdentifier cameraColorBufferRT) {}
public virtual void RenderForward(Camera camera, ScriptableRenderContext renderLoop, bool renderOpaque) {}
public virtual void RenderForward(Camera camera, ScriptableRenderContext renderContext, bool renderOpaque) {}
public Light GetCurrentSunLight() { return m_CurrentSunLight; }
}

12
Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/TilePass/TilePass.cs


}
#endif
public override void RenderDeferredLighting(HDRenderPipeline.HDCamera hdCamera, ScriptableRenderContext renderLoop, RenderTargetIdentifier cameraColorBufferRT)
public override void RenderDeferredLighting(HDRenderPipeline.HDCamera hdCamera, ScriptableRenderContext renderContext, RenderTargetIdentifier cameraColorBufferRT)
{
var bUseClusteredForDeferred = !usingFptl;

}
#endif
using (new Utilities.ProfilingSample(disableTileAndCluster ? "SinglePass - Deferred Lighting Pass" : "TilePass - Deferred Lighting Pass", renderLoop))
using (new Utilities.ProfilingSample(disableTileAndCluster ? "SinglePass - Deferred Lighting Pass" : "TilePass - Deferred Lighting Pass", renderContext))
{
var cmd = new CommandBuffer();

// Pass global parameters to compute shader
// TODO: get rid of this by making global parameters visible to compute shaders
BindGlobalParams(cmd, shadeOpaqueShader, kernel, camera, renderLoop);
BindGlobalParams(cmd, shadeOpaqueShader, kernel, camera, renderContext);
cmd.SetComputeTextureParam(shadeOpaqueShader, kernel, "_CameraDepthTexture", Shader.PropertyToID("_CameraDepthTexture"));
cmd.SetComputeTextureParam(shadeOpaqueShader, kernel, "_GBufferTexture0", Shader.PropertyToID("_GBufferTexture0"));

SetGlobalPropertyRedirect(null, 0, null);
//}
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
public override void RenderForward(Camera camera, ScriptableRenderContext renderLoop, bool renderOpaque)
public override void RenderForward(Camera camera, ScriptableRenderContext renderContext, bool renderOpaque)
{
// Note: if we use render opaque with deferred tiling we need to render a opque depth pass for these opaque objects
bool useFptl = renderOpaque && usingFptl;

cmd.SetGlobalBuffer("g_vLightListGlobal", useFptl ? s_LightList : s_PerVoxelLightLists);
}
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}
}

4
Assets/ScriptableRenderLoop/HDRenderPipeline/Material/Lit/Lit.cs


isInit = false;
}
public void RenderInit(Rendering.ScriptableRenderContext renderLoop)
public void RenderInit(Rendering.ScriptableRenderContext renderContext)
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
isInit = true;

26
Assets/ScriptableRenderLoop/HDRenderPipeline/SceneSettings/CommonSettings.cs


void OnEnable()
{
HDRenderPipeline renderLoop = Utilities.GetHDRenderPipeline();
if (renderLoop == null)
HDRenderPipeline renderPipeline = Utilities.GetHDRenderPipeline();
if (renderPipeline == null)
if (renderLoop.commonSettings == null)
renderLoop.commonSettings = this;
else if (renderLoop.commonSettings != this)
if (renderPipeline.commonSettings == null)
renderPipeline.commonSettings = this;
else if (renderPipeline.commonSettings != this)
Debug.LogWarning("Only one CommonSettings can be setup at a time.");
OnSkyRendererChanged();

{
HDRenderPipeline renderLoop = Utilities.GetHDRenderPipeline();
if (renderLoop == null)
HDRenderPipeline renderPipeline = Utilities.GetHDRenderPipeline();
if (renderPipeline == null)
if (renderLoop.commonSettings == this)
renderLoop.commonSettings = null;
if (renderPipeline.commonSettings == this)
renderPipeline.commonSettings = null;
}
void OnValidate()

void OnSkyRendererChanged()
{
HDRenderPipeline renderLoop = Utilities.GetHDRenderPipeline();
if (renderLoop == null)
HDRenderPipeline renderPipeline = Utilities.GetHDRenderPipeline();
if (renderPipeline == null)
renderLoop.InstantiateSkyRenderer(skyRendererType);
renderPipeline.InstantiateSkyRenderer(skyRendererType);
Type skyParamType = renderLoop.skyManager.GetSkyParameterType();
Type skyParamType = renderPipeline.skyManager.GetSkyParameterType();
// Disable all incompatible sky parameters and enable the compatible one
bool found = false;

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/HDRISky/HDRISkyRenderer.cs


var cmd = new CommandBuffer { name = "" };
cmd.DrawMesh(builtinParams.skyMesh, Matrix4x4.identity, m_SkyHDRIMaterial);
builtinParams.renderLoop.ExecuteCommandBuffer(cmd);
builtinParams.renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}
}

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/ProceduralSky/ProceduralSkyRenderer.cs


cmd.SetGlobalTexture("_CameraDepthTexture", builtinParams.depthBuffer);
}
cmd.DrawMesh(builtinParams.skyMesh, Matrix4x4.identity, m_ProceduralSkyMaterial);
builtinParams.renderLoop.ExecuteCommandBuffer(cmd);
builtinParams.renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}
}

40
Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/SkyManager.cs


public Vector3 cameraPosWS;
public Vector4 screenSize;
public Mesh skyMesh;
public ScriptableRenderContext renderLoop;
public ScriptableRenderContext renderContext;
public Light sunLight;
public RenderTargetIdentifier colorBuffer;
public RenderTargetIdentifier depthBuffer;

bool m_UpdateRequired = true;
float m_CurrentUpdateTime = 0.0f;
const bool m_useMIS = false;
bool m_useMIS = false;
SkyParameters m_SkyParameters = null;

{
for (int i = 0; i < 6; ++i)
{
Utilities.SetRenderTarget(builtinParams.renderLoop, target, ClearFlag.ClearNone, 0, (CubemapFace)i);
Utilities.SetRenderTarget(builtinParams.renderContext, target, ClearFlag.ClearNone, 0, (CubemapFace)i);
builtinParams.invViewProjMatrix = m_faceCameraInvViewProjectionMatrix[i];
builtinParams.viewProjMatrix = m_faceCameraViewProjectionMatrix[i];

}
}
private void BuildProbabilityTables(ScriptableRenderContext renderLoop)
private void BuildProbabilityTables(ScriptableRenderContext renderContext)
{
// Bind the input cubemap.
m_BuildProbabilityTablesCS.SetTexture(m_ConditionalDensitiesKernel, "envMap", m_SkyboxCubemapRT);

var cmd = new CommandBuffer() { name = "" };
cmd.DispatchCompute(m_BuildProbabilityTablesCS, m_ConditionalDensitiesKernel, (int)LightSamplingParameters.TextureHeight, 1, 1);
cmd.DispatchCompute(m_BuildProbabilityTablesCS, m_MarginalRowDensitiesKernel, 1, 1, 1);
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
private void RenderCubemapGGXConvolution(ScriptableRenderContext renderLoop, BuiltinSkyParameters builtinParams, SkyParameters skyParams, Texture input, RenderTexture target)
private void RenderCubemapGGXConvolution(ScriptableRenderContext renderContext, BuiltinSkyParameters builtinParams, SkyParameters skyParams, Texture input, RenderTexture target)
using (new Utilities.ProfilingSample("Sky Pass: GGX Convolution", renderLoop))
using (new Utilities.ProfilingSample("Sky Pass: GGX Convolution", renderContext))
{
int mipCount = 1 + (int)Mathf.Log(input.width, 2.0f);
if (mipCount < ((int)EnvConstants.SpecCubeLodStep + 1))

if (m_useMIS)
{
BuildProbabilityTables(renderLoop);
BuildProbabilityTables(renderContext);
}
// Copy the first mip.

for (int face = 0; face < 6; ++face)
{
Utilities.SetRenderTarget(renderLoop, target, ClearFlag.ClearNone, mip, (CubemapFace)face);
Utilities.SetRenderTarget(renderContext, target, ClearFlag.ClearNone, mip, (CubemapFace)face);
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}
}

m_UpdateRequired = true;
}
public void UpdateEnvironment(HDRenderPipeline.HDCamera camera, Light sunLight, ScriptableRenderContext renderLoop)
public void UpdateEnvironment(HDRenderPipeline.HDCamera camera, Light sunLight, ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("Sky Environment Pass", renderLoop))
using (new Utilities.ProfilingSample("Sky Environment Pass", renderContext))
m_BuiltinParameters.renderLoop = renderLoop;
m_BuiltinParameters.renderContext = renderContext;
m_BuiltinParameters.sunLight = sunLight;
// We need one frame delay for this update to work since DynamicGI.UpdateEnvironment is executed direclty but the renderloop is not (so we need to wait for the sky texture to be rendered first)

// Render sky into a cubemap - doesn't happen every frame, can be controlled
RenderSkyToCubemap(m_BuiltinParameters, skyParameters, m_SkyboxCubemapRT);
// Convolve downsampled cubemap
RenderCubemapGGXConvolution(renderLoop, m_BuiltinParameters, skyParameters, m_SkyboxCubemapRT, m_SkyboxGGXCubemapRT);
RenderCubemapGGXConvolution(renderContext, m_BuiltinParameters, skyParameters, m_SkyboxCubemapRT, m_SkyboxGGXCubemapRT);
m_NeedLowLevelUpdateEnvironment = true;
m_UpdateRequired = false;

// DynamicGI.UpdateEnvironment();
// // Clear temp cubemap and redo GGX from black
// Utilities.SetRenderTarget(renderLoop, m_SkyboxCubemapRT, ClearFlag.ClearColor);
// RenderCubemapGGXConvolution(renderLoop, m_BuiltinParameters, skyParameters, m_SkyboxCubemapRT, m_SkyboxGGXCubemapRT);
// Utilities.SetRenderTarget(renderContext, m_SkyboxCubemapRT, ClearFlag.ClearColor);
// RenderCubemapGGXConvolution(renderContext, m_BuiltinParameters, skyParameters, m_SkyboxCubemapRT, m_SkyboxGGXCubemapRT);
// m_SkyParametersHash = 0;
//}

}
public void RenderSky(HDRenderPipeline.HDCamera camera, Light sunLight, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ScriptableRenderContext renderLoop)
public void RenderSky(HDRenderPipeline.HDCamera camera, Light sunLight, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ScriptableRenderContext renderContext)
using (new Utilities.ProfilingSample("Sky Pass", renderLoop))
using (new Utilities.ProfilingSample("Sky Pass", renderContext))
m_BuiltinParameters.renderLoop = renderLoop;
m_BuiltinParameters.renderContext = renderContext;
m_BuiltinParameters.sunLight = sunLight;
m_BuiltinParameters.invViewProjMatrix = camera.invViewProjectionMatrix;
m_BuiltinParameters.viewProjMatrix = camera.viewProjectionMatrix;

m_BuiltinParameters.colorBuffer = colorBuffer;
m_BuiltinParameters.depthBuffer = depthBuffer;
Utilities.SetRenderTarget(renderLoop, colorBuffer, depthBuffer);
Utilities.SetRenderTarget(renderContext, colorBuffer, depthBuffer);
m_Renderer.RenderSky(m_BuiltinParameters, skyParameters);
}
}

18
Assets/ScriptableRenderLoop/HDRenderPipeline/Sky/SkyParameters.cs


protected void OnEnable()
{
HDRenderPipeline renderLoop = Utilities.GetHDRenderPipeline();
if (renderLoop == null)
HDRenderPipeline renderPipeline = Utilities.GetHDRenderPipeline();
if (renderPipeline == null)
{
return;
}

.GetFields(BindingFlags.Public | BindingFlags.Instance)
.ToArray();
if (renderLoop.skyManager.skyParameters == null || renderLoop.skyManager.skyParameters.GetType() != this.GetType()) // We allow override of parameters only if the type is different. It means that we changed the Sky Renderer and might need a new set of parameters.
renderLoop.skyManager.skyParameters = this;
else if (renderLoop.skyManager.skyParameters != this && renderLoop.skyManager.skyParameters.GetType() == this.GetType())
if (renderPipeline.skyManager.skyParameters == null || renderPipeline.skyManager.skyParameters.GetType() != this.GetType()) // We allow override of parameters only if the type is different. It means that we changed the Sky Renderer and might need a new set of parameters.
renderPipeline.skyManager.skyParameters = this;
else if (renderPipeline.skyManager.skyParameters != this && renderPipeline.skyManager.skyParameters.GetType() == this.GetType())
HDRenderPipeline renderLoop = Utilities.GetHDRenderPipeline();
if (renderLoop == null)
HDRenderPipeline renderPipeline = Utilities.GetHDRenderPipeline();
if (renderPipeline == null)
if (renderLoop.skyManager.skyParameters == this)
renderLoop.skyManager.skyParameters = null;
if (renderPipeline.skyManager.skyParameters == this)
renderPipeline.skyManager.skyParameters = null;
}
public int GetHash()

42
Assets/ScriptableRenderLoop/HDRenderPipeline/Utilities.cs


// Render Target Management.
public const ClearFlag kClearAll = ClearFlag.ClearDepth | ClearFlag.ClearColor;
public static void SetRenderTarget(ScriptableRenderContext renderLoop, RenderTargetIdentifier buffer, ClearFlag clearFlag = ClearFlag.ClearNone, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown)
public static void SetRenderTarget(ScriptableRenderContext renderContext, RenderTargetIdentifier buffer, ClearFlag clearFlag = ClearFlag.ClearNone, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown)
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
public static void SetRenderTarget(ScriptableRenderContext renderLoop, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown)
public static void SetRenderTarget(ScriptableRenderContext renderContext, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown)
SetRenderTarget(renderLoop, colorBuffer, depthBuffer, ClearFlag.ClearNone, new Color(0.0f, 0.0f, 0.0f, 0.0f), miplevel, cubemapFace);
SetRenderTarget(renderContext, colorBuffer, depthBuffer, ClearFlag.ClearNone, new Color(0.0f, 0.0f, 0.0f, 0.0f), miplevel, cubemapFace);
public static void SetRenderTarget(ScriptableRenderContext renderLoop, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown)
public static void SetRenderTarget(ScriptableRenderContext renderContext, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown)
SetRenderTarget(renderLoop, colorBuffer, depthBuffer, clearFlag, new Color(0.0f, 0.0f, 0.0f, 0.0f), miplevel, cubemapFace);
SetRenderTarget(renderContext, colorBuffer, depthBuffer, clearFlag, new Color(0.0f, 0.0f, 0.0f, 0.0f), miplevel, cubemapFace);
public static void SetRenderTarget(ScriptableRenderContext renderLoop, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown)
public static void SetRenderTarget(ScriptableRenderContext renderContext, RenderTargetIdentifier colorBuffer, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = CubemapFace.Unknown)
{
var cmd = new CommandBuffer();
cmd.name = "";

renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
public static void SetRenderTarget(ScriptableRenderContext renderLoop, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer)
public static void SetRenderTarget(ScriptableRenderContext renderContext, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer)
SetRenderTarget(renderLoop, colorBuffers, depthBuffer, ClearFlag.ClearNone, Color.black);
SetRenderTarget(renderContext, colorBuffers, depthBuffer, ClearFlag.ClearNone, Color.black);
public static void SetRenderTarget(ScriptableRenderContext renderLoop, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag = ClearFlag.ClearNone)
public static void SetRenderTarget(ScriptableRenderContext renderContext, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag = ClearFlag.ClearNone)
SetRenderTarget(renderLoop, colorBuffers, depthBuffer, clearFlag, Color.black);
SetRenderTarget(renderContext, colorBuffers, depthBuffer, clearFlag, Color.black);
public static void SetRenderTarget(ScriptableRenderContext renderLoop, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, Color clearColor)
public static void SetRenderTarget(ScriptableRenderContext renderContext, RenderTargetIdentifier[] colorBuffers, RenderTargetIdentifier depthBuffer, ClearFlag clearFlag, Color clearColor)
{
var cmd = new CommandBuffer();
cmd.name = "";

renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}

: IDisposable
{
bool disposed = false;
ScriptableRenderContext renderLoop;
ScriptableRenderContext renderContext;
renderLoop = _renderloop;
renderContext = _renderloop;
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}

CommandBuffer cmd = new CommandBuffer();
cmd.name = "";
cmd.EndSample(name);
renderLoop.ExecuteCommandBuffer(cmd);
renderContext.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}

public static HDRenderPipeline GetHDRenderPipeline()
{
HDRenderPipeline renderLoop = UnityEngine.Rendering.GraphicsSettings.renderPipeline as HDRenderPipeline;
if (renderLoop == null)
HDRenderPipeline renderContext = UnityEngine.Rendering.GraphicsSettings.renderPipeline as HDRenderPipeline;
if (renderContext == null)
return renderLoop;
return renderContext;
}
}
}

8
Assets/ScriptableRenderLoop/fptl/FptlLighting.cs


return numLightsOut + numProbesOut;
}
public void Render(ScriptableRenderContext renderLoop, IEnumerable<Camera> cameras)
public void Render(ScriptableRenderContext renderContext, IEnumerable<Camera> cameras)
{
foreach (var camera in cameras)
{

m_ShadowPass.UpdateCullingParameters(ref cullingParams);
var cullResults = CullResults.Cull(ref cullingParams, renderLoop);
ExecuteRenderLoop(camera, cullResults, renderLoop);
var cullResults = CullResults.Cull(ref cullingParams, renderContext);
ExecuteRenderLoop(camera, cullResults, renderContext);
renderLoop.Submit();
renderContext.Submit();
}
void FinalPass(ScriptableRenderContext loop)

10
ProjectSettings/GraphicsSettings.asset


--- !u!30 &1
GraphicsSettings:
m_ObjectHideFlags: 0
serializedVersion: 10
serializedVersion: 11
m_Deferred:
m_Mode: 0
m_Shader: {fileID: 0}

m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_CustomRenderPipeline: {fileID: 11400000, guid: 2400b74f5ce370c4481e5dc417d03703,
m_CustomRenderPipeline: {fileID: 11400000, guid: e185fecca3c73cd47a09f1092663ef32,
type: 2}
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}

m_FogStripping: 0
m_LightmapKeepPlain: 1
m_LightmapKeepDirCombined: 1
m_LightmapKeepDirSeparate: 1
m_LightmapKeepDynamicDirSeparate: 1
m_LightmapKeepShadowMask: 1
m_LightmapKeepSubtractive: 1
m_LightsUseLinearIntensity: 1
m_LightsUseCCT: 1
正在加载...
取消
保存