模糊背景禁用测试

main
yurui 2024-08-15 18:15:55 +08:00
parent d1a4bf6791
commit 8e86b2393f
1 changed files with 4 additions and 4 deletions

View File

@ -457,14 +457,14 @@ namespace Gameplay
screenTexture = RenderTexturePool.Instance.Create(SCREEN_SNAPSHOT, width, height);
// 先渲图
//CameraManager.Instance.SetMainCameraActive(false);
CameraManager.Instance.SetMainCameraActive(false);
Camera uiCamera = CameraManager.Instance.UICamera;
uiCamera.targetTexture = screenTexture;
uiCamera.Render();
uiCamera.targetTexture = null;
#region 高斯模糊处理
Material material;
/*Material material;
if (PerformanceManager.instance.deviceConfig.UseLowBlur) // 先不做处理,看看效果
{
DebugUtil.Log("低品质截图");
@ -474,11 +474,11 @@ namespace Gameplay
{
DebugUtil.Log("高品质高斯模糊截图");
material = await AssetManager.Instance.LoadAssetAsync<Material>("Assets/Art/UI/Material/NLD_URP_UI_GaussianBlur.mat");
}
}*/
// 需要用一个缓存的rt,不然移动平台会出现方块
RenderTexture cacheRt = CameraManager.Instance.DefaultRenderTarget;
Graphics.Blit(screenTexture, cacheRt, material);
Graphics.Blit(screenTexture, cacheRt);
Graphics.Blit(cacheRt, screenTexture);
#endregion
}