浏览代码

Introduce 'invalidRTI'

/main
Evgenii Golubev 8 年前
当前提交
11fe42e1
共有 2 个文件被更改,包括 4 次插入5 次删除
  1. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/ProceduralSky/ProceduralSkyRenderer.cs
  2. 7
      Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyManager.cs

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


*/
// Expected to be valid for the sky pass, and invalid for the cube map generation pass.
if (builtinParams.depthBufferIsValid)
if (builtinParams.depthBuffer != BuiltinSkyParameters.invalidRTI)
{
m_ProceduralSkyMaterial.EnableKeyword("PERFORM_SKY_OCCLUSION_TEST");
}

7
Assets/ScriptableRenderLoop/HDRenderLoop/Sky/SkyManager.cs


public Light sunLight;
public RenderTargetIdentifier colorBuffer;
public RenderTargetIdentifier depthBuffer;
public bool depthBufferIsValid;
public static RenderTargetIdentifier invalidRTI = -1;
}
public class SkyManager

builtinParams.screenSize = m_CubemapScreenSize;
builtinParams.skyMesh = m_CubemapFaceMesh[i];
builtinParams.colorBuffer = target;
builtinParams.depthBuffer = -1;
builtinParams.depthBufferIsValid = false;
builtinParams.depthBuffer = BuiltinSkyParameters.invalidRTI;
m_Renderer.RenderSky(builtinParams, skyParameters);
}
}

m_BuiltinParameters.skyMesh = BuildSkyMesh(camera.camera.GetComponent<Transform>().position, m_BuiltinParameters.invViewProjMatrix, false);
m_BuiltinParameters.colorBuffer = colorBuffer;
m_BuiltinParameters.depthBuffer = depthBuffer;
m_BuiltinParameters.depthBufferIsValid = true;
Utilities.SetRenderTarget(renderLoop, colorBuffer, depthBuffer);
m_Renderer.RenderSky(m_BuiltinParameters, skyParameters);

正在加载...
取消
保存