功能批量实现 优化 服务端 新浮动小游戏框架 新界面UI
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.RenderGraphModule;
|
||||
using UnityEngine.Rendering.RenderGraphModule.Util;
|
||||
@@ -156,15 +156,22 @@ public class GlobalAfterimageRendererFeature : ScriptableRendererFeature
|
||||
RenderingUtils.ReAllocateHandleIfNeeded(ref compatibilityCopy, descriptor, FilterMode.Bilinear, TextureWrapMode.Clamp, name: "_GlobalAfterimageCompatibilityCopy");
|
||||
|
||||
CommandBuffer cmd = CommandBufferPool.Get("Global Afterimage Pass");
|
||||
if (captureRequested)
|
||||
try
|
||||
{
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, snapshotTexture);
|
||||
}
|
||||
if (captureRequested)
|
||||
{
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, snapshotTexture);
|
||||
}
|
||||
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, compatibilityCopy);
|
||||
Blitter.BlitCameraTexture(cmd, compatibilityCopy, renderingData.cameraData.renderer.cameraColorTargetHandle, passMaterial, 0);
|
||||
context.ExecuteCommandBuffer(cmd);
|
||||
CommandBufferPool.Release(cmd);
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, compatibilityCopy);
|
||||
Blitter.BlitCameraTexture(cmd, compatibilityCopy, renderingData.cameraData.renderer.cameraColorTargetHandle, passMaterial, 0);
|
||||
context.ExecuteCommandBuffer(cmd);
|
||||
}
|
||||
finally
|
||||
{
|
||||
cmd.Clear();
|
||||
CommandBufferPool.Release(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyMaterialProperties()
|
||||
@@ -176,3 +183,4 @@ public class GlobalAfterimageRendererFeature : ScriptableRendererFeature
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.RenderGraphModule;
|
||||
using UnityEngine.Rendering.RenderGraphModule.Util;
|
||||
@@ -166,10 +166,17 @@ public class GlobalDistortionRendererFeature : ScriptableRendererFeature
|
||||
RenderingUtils.ReAllocateHandleIfNeeded(ref compatibilityCopy, descriptor, FilterMode.Bilinear, TextureWrapMode.Clamp, name: "_GlobalDistortionCompatibilityCopy");
|
||||
|
||||
CommandBuffer cmd = CommandBufferPool.Get("Global Distortion Pass");
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, compatibilityCopy);
|
||||
Blitter.BlitCameraTexture(cmd, compatibilityCopy, renderingData.cameraData.renderer.cameraColorTargetHandle, passMaterial, 0);
|
||||
context.ExecuteCommandBuffer(cmd);
|
||||
CommandBufferPool.Release(cmd);
|
||||
try
|
||||
{
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, compatibilityCopy);
|
||||
Blitter.BlitCameraTexture(cmd, compatibilityCopy, renderingData.cameraData.renderer.cameraColorTargetHandle, passMaterial, 0);
|
||||
context.ExecuteCommandBuffer(cmd);
|
||||
}
|
||||
finally
|
||||
{
|
||||
cmd.Clear();
|
||||
CommandBufferPool.Release(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyMaterialProperties()
|
||||
@@ -183,3 +190,4 @@ public class GlobalDistortionRendererFeature : ScriptableRendererFeature
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.RenderGraphModule;
|
||||
using UnityEngine.Rendering.RenderGraphModule.Util;
|
||||
@@ -40,7 +40,7 @@ public class GlobalGlitchRendererFeature : ScriptableRendererFeature
|
||||
bool hasVolume = settings != null && settings.active;
|
||||
float runtimeIntensity = GlobalGlitchRuntimeController.RuntimeIntensity;
|
||||
float baseIntensity = hasVolume ? settings.intensity.value : 0f;
|
||||
float finalIntensity = Mathf.Clamp01(baseIntensity + runtimeIntensity);
|
||||
float finalIntensity = Mathf.Clamp01(Mathf.Max(baseIntensity, runtimeIntensity));
|
||||
if (finalIntensity <= 0.0001f)
|
||||
return;
|
||||
|
||||
@@ -56,7 +56,6 @@ public class GlobalGlitchRendererFeature : ScriptableRendererFeature
|
||||
hasVolume ? settings.stripFrequency.value : 48f,
|
||||
hasVolume ? settings.scanlineStrength.value : 0.18f
|
||||
);
|
||||
|
||||
renderer.EnqueuePass(pass);
|
||||
}
|
||||
|
||||
@@ -159,10 +158,17 @@ public class GlobalGlitchRendererFeature : ScriptableRendererFeature
|
||||
RenderingUtils.ReAllocateHandleIfNeeded(ref compatibilityCopy, descriptor, FilterMode.Bilinear, TextureWrapMode.Clamp, name: "_GlobalGlitchCompatibilityCopy");
|
||||
|
||||
CommandBuffer cmd = CommandBufferPool.Get("Global Glitch Pass");
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, compatibilityCopy);
|
||||
Blitter.BlitCameraTexture(cmd, compatibilityCopy, renderingData.cameraData.renderer.cameraColorTargetHandle, passMaterial, 0);
|
||||
context.ExecuteCommandBuffer(cmd);
|
||||
CommandBufferPool.Release(cmd);
|
||||
try
|
||||
{
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, compatibilityCopy);
|
||||
Blitter.BlitCameraTexture(cmd, compatibilityCopy, renderingData.cameraData.renderer.cameraColorTargetHandle, passMaterial, 0);
|
||||
context.ExecuteCommandBuffer(cmd);
|
||||
}
|
||||
finally
|
||||
{
|
||||
cmd.Clear();
|
||||
CommandBufferPool.Release(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyMaterialProperties()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.RenderGraphModule;
|
||||
using UnityEngine.Rendering.RenderGraphModule.Util;
|
||||
@@ -135,10 +135,17 @@ public class GlobalMonochromeRendererFeature : ScriptableRendererFeature
|
||||
RenderingUtils.ReAllocateHandleIfNeeded(ref compatibilityCopy, descriptor, FilterMode.Bilinear, TextureWrapMode.Clamp, name: "_GlobalMonochromeCompatibilityCopy");
|
||||
|
||||
CommandBuffer cmd = CommandBufferPool.Get("Global Monochrome Pass");
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, compatibilityCopy);
|
||||
Blitter.BlitCameraTexture(cmd, compatibilityCopy, renderingData.cameraData.renderer.cameraColorTargetHandle, passMaterial, 0);
|
||||
context.ExecuteCommandBuffer(cmd);
|
||||
CommandBufferPool.Release(cmd);
|
||||
try
|
||||
{
|
||||
Blitter.BlitCameraTexture(cmd, renderingData.cameraData.renderer.cameraColorTargetHandle, compatibilityCopy);
|
||||
Blitter.BlitCameraTexture(cmd, compatibilityCopy, renderingData.cameraData.renderer.cameraColorTargetHandle, passMaterial, 0);
|
||||
context.ExecuteCommandBuffer(cmd);
|
||||
}
|
||||
finally
|
||||
{
|
||||
cmd.Clear();
|
||||
CommandBufferPool.Release(cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user