浏览代码

Fixed global param not pushed before rendering

/main
Antoine Lelievre 7 年前
当前提交
5fe5a99f
共有 2 个文件被更改,包括 1 次插入5 次删除
  1. 5
      com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs
  2. 1
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs

5
com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs


void PushGlobalParams(HDCamera hdCamera, CommandBuffer cmd)
{
IndirectLightingController indirectLightVolume = VolumeManager.instance.stack.GetComponent<IndirectLightingController>();
Vector4 indirectLightData = new Vector4(indirectLightVolume.indirectDiffuseIntensity, indirectLightVolume.indirectSpecularIntensity, 0, 0);
using (new ProfilingSample(cmd, "Push Global Parameters", CustomSamplerId.TPPushGlobalParameters.GetSampler()))
{
Camera camera = hdCamera.camera;

cmd.SetGlobalInt(HDShaderIDs._NumTileClusteredX, GetNumTileClusteredX(hdCamera));
cmd.SetGlobalInt(HDShaderIDs._NumTileClusteredY, GetNumTileClusteredY(hdCamera));
cmd.SetGlobalVector(HDShaderIDs._IndirectLightingMultiplier, (indirectLightVolume != null) ? indirectLightData : Vector4.one);
if (m_FrameSettings.lightLoopSettings.enableBigTilePrepass)
cmd.SetGlobalBuffer(HDShaderIDs.g_vBigTileLightList, s_BigTileLightList);

1
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs


hdCamera.SetupGlobalStereoParams(cmd);
cmd.SetGlobalInt(HDShaderIDs._SSReflectionEnabled, hdCamera.frameSettings.enableSSR ? 1 : 0);
cmd.SetGlobalVector(HDShaderIDs._IndirectLightingMultiplier, new Vector4(VolumeManager.instance.stack.GetComponent<IndirectLightingController>().indirectDiffuseIntensity, 0, 0 , 0));
PushGlobalRTHandle(
cmd,

正在加载...
取消
保存