浏览代码

HDRenderPipeline: Update ShaderIds for SSAO

/RenderPassXR_Sandbox
sebastienlagarde 7 年前
当前提交
6e00ceff
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/ScreenSpaceAmbientOcclusion.cs

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/ScreenSpaceAmbientOcclusion.cs


// If SSAO is disable, simply put a white 1x1 texture
if (settings.enable == false || isForward)
{
cmd.SetGlobalTexture(Uniforms._AOBuffer, UnityEngine.Rendering.PostProcessing.RuntimeUtilities.blackTexture); // Neutral is black, see the comment in the shaders
cmd.SetGlobalFloat("_AmbientOcclusionDirectLightStrenght", 0.0f);
cmd.SetGlobalTexture(HDShaderIDs._AmbientOcclusionTexture, UnityEngine.Rendering.PostProcessing.RuntimeUtilities.blackTexture); // Neutral is black, see the comment in the shaders
cmd.SetGlobalFloat(HDShaderIDs._AmbientOcclusionDirectLightStrenght, 0.0f);
return;
}

cmd.ReleaseTemporaryRT(Uniforms._TempTex1);
// Setup texture for lighting pass (automatic of unity)
cmd.SetGlobalTexture("_AmbientOcclusionTexture", Uniforms._AOBuffer);
cmd.SetGlobalFloat("_AmbientOcclusionDirectLightStrenght", settings.affectDirectLigthingStrenght);
cmd.SetGlobalTexture(HDShaderIDs._AmbientOcclusionTexture, Uniforms._AOBuffer);
cmd.SetGlobalFloat(HDShaderIDs._AmbientOcclusionDirectLightStrenght, settings.affectDirectLigthingStrenght);
hdRP.PushFullScreenDebugTexture(cmd, Uniforms._AOBuffer, hdCamera.camera, renderContext, FullScreenDebugMode.SSAO);
}
}

正在加载...
取消
保存