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