diff --git a/Packages/com.unity.postprocessing@3.2.2/.buginfo b/Packages/com.unity.postprocessing@3.2.2/.buginfo
new file mode 100644
index 0000000..ec55b6a
--- /dev/null
+++ b/Packages/com.unity.postprocessing@3.2.2/.buginfo
@@ -0,0 +1,5 @@
+system: jira
+server: jira.unity3d.com
+issuetype: Bug
+package: PostProcessing
+project: PPB
diff --git a/Packages/com.unity.postprocessing@3.2.2/.gitattributes b/Packages/com.unity.postprocessing@3.2.2/.gitattributes
new file mode 100644
index 0000000..3f2c76d
--- /dev/null
+++ b/Packages/com.unity.postprocessing@3.2.2/.gitattributes
@@ -0,0 +1,54 @@
+* text=auto eol=lf
+
+# Unity assets are always serialized using lf endings
+LightingData.asset binary
+*.unitypackage filter=lfs diff=lfs merge=lfs -text
+*.[pP][sS][dD] filter=lfs diff=lfs merge=lfs -text
+*.[jJ][pP][gG] filter=lfs diff=lfs merge=lfs -text
+*.[pP][nN][gG] filter=lfs diff=lfs merge=lfs -text
+*.[gG][iI][fF] filter=lfs diff=lfs merge=lfs -text
+*.[bB][mM][pP] filter=lfs diff=lfs merge=lfs -text
+*.[tT][gG][aA] filter=lfs diff=lfs merge=lfs -text
+*.[tT][iI][fF][fF] filter=lfs diff=lfs merge=lfs -text
+*.[tT][iI][fF] filter=lfs diff=lfs merge=lfs -text
+*.[iI][fF][fF] filter=lfs diff=lfs merge=lfs -text
+*.[pP][iI][cC][tT] filter=lfs diff=lfs merge=lfs -text
+*.[dD][dD][sS] filter=lfs diff=lfs merge=lfs -text
+*.[xX][cC][fF] filter=lfs diff=lfs merge=lfs -text
+*.[mM][pP]3 filter=lfs diff=lfs merge=lfs -text
+*.[oO][gG][gG] filter=lfs diff=lfs merge=lfs -text
+*.[wW][aA][vV] filter=lfs diff=lfs merge=lfs -text
+*.[aA][iI][fF][fF] filter=lfs diff=lfs merge=lfs -text
+*.[aA][iI][fF] filter=lfs diff=lfs merge=lfs -text
+*.[mM][oO][dD] filter=lfs diff=lfs merge=lfs -text
+*.[iI][tT][tT] filter=lfs diff=lfs merge=lfs -text
+*.[sS]3[mM] filter=lfs diff=lfs merge=lfs -text
+*.[xX][mM] filter=lfs diff=lfs merge=lfs -text
+*.[mM][oO][vV] filter=lfs diff=lfs merge=lfs -text
+*.[aA][vV][iI] filter=lfs diff=lfs merge=lfs -text
+*.[aA][sS][fF] filter=lfs diff=lfs merge=lfs -text
+*.[mM][pP][gG] filter=lfs diff=lfs merge=lfs -text
+*.[mM][pP][eE][gG] filter=lfs diff=lfs merge=lfs -text
+*.[mM][pP]4 filter=lfs diff=lfs merge=lfs -text
+*.[fF][bB][xX] filter=lfs diff=lfs merge=lfs -text
+*.[oO][bB][jJ] filter=lfs diff=lfs merge=lfs -text
+*.[mM][aA][xX] filter=lfs diff=lfs merge=lfs -text
+*.[bB][lL][eE][nN][dD] filter=lfs diff=lfs merge=lfs -text
+*.[dD][aA][eE] filter=lfs diff=lfs merge=lfs -text
+*.[mM][bB] filter=lfs diff=lfs merge=lfs -text
+*.[mM][aA] filter=lfs diff=lfs merge=lfs -text
+*.3[dD][sS] filter=lfs diff=lfs merge=lfs -text
+*.[dD][fF][xX] filter=lfs diff=lfs merge=lfs -text
+*.[cC]4[dD] filter=lfs diff=lfs merge=lfs -text
+*.[lL][wW][oO] filter=lfs diff=lfs merge=lfs -text
+*.[lL][wW][oO]2 filter=lfs diff=lfs merge=lfs -text
+*.[aA][bB][cC] filter=lfs diff=lfs merge=lfs -text
+*.3[dD][mM] filter=lfs diff=lfs merge=lfs -text
+*.[dD][lL][lL] filter=lfs diff=lfs merge=lfs -text
+*.[pP][dD][bB] filter=lfs diff=lfs merge=lfs -text
+*.[mM][dD][bB] filter=lfs diff=lfs merge=lfs -text
+*.[zZ][iI][pP] filter=lfs diff=lfs merge=lfs -text
+*.7[zZ] filter=lfs diff=lfs merge=lfs -text
+*.[gG][zZ] filter=lfs diff=lfs merge=lfs -text
+*.[rR][aA][rR] filter=lfs diff=lfs merge=lfs -text
+*.[tT][aA][rR] filter=lfs diff=lfs merge=lfs -text
diff --git a/Packages/com.unity.postprocessing@3.2.2/CHANGELOG.md b/Packages/com.unity.postprocessing@3.2.2/CHANGELOG.md
index 7e6c51c..10b262d 100644
--- a/Packages/com.unity.postprocessing@3.2.2/CHANGELOG.md
+++ b/Packages/com.unity.postprocessing@3.2.2/CHANGELOG.md
@@ -4,11 +4,18 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
-## [3.3.1] - 2023-06-02
+## [3.4.0] - 2023-12-11
+
+### Added
+- Added WebGPU support
### Fixed
-- Fixed obsolete FormatUsage bug
-- Disabled compute based effects not supported on WebGL and Android OpenGL
+- Fixed obsolete FormatUsage error
+- Fixed non-scalar logical operation error
+- Fixed MSVO to support platforms with limited storage texture support
+- Fixed compute based effects not supported on WebGL and Android OpenGL (IN-2999)
+- Fixed grid gizmo is visible through geometry when Post Process Layer is enabled (IN-10318)
+- Fixed transparent objects rendering incorrectly when TAA is disabled (IN-31494)
## [3.3.0] - 2023-05-11
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs
index ecb253d..e329c3f 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs
@@ -49,10 +49,14 @@ namespace UnityEditor.Rendering.PostProcessing
}
else if (aoMode == (int)AmbientOcclusionMode.MultiScaleVolumetricObscurance)
{
- if (!SystemInfo.supportsComputeShaders || EditorUtilities.isTargetingWebGL)
+ if (!SystemInfo.supportsComputeShaders)
{
EditorGUILayout.HelpBox("Multi-scale volumetric obscurance requires compute shader support which is not available on this platform.", MessageType.Error);
}
+ else if (EditorUtilities.isTargetingWebGL)
+ {
+ EditorGUILayout.HelpBox("Multi-scale volumetric obscurance requires compute shader support (WebGPU) when running on Web.", MessageType.Warning);
+ }
else if(EditorUtilities.isTargetingAndroid)
{
EditorGUILayout.HelpBox("Multi-scale volumetric obscurance requires compute shader support (Vulkan) when running on Android.", MessageType.Warning);
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/Effects/AutoExposureEditor.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/Effects/AutoExposureEditor.cs
index 559cf51..ae2e1bd 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/Effects/AutoExposureEditor.cs
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Editor/Effects/AutoExposureEditor.cs
@@ -31,10 +31,14 @@ namespace UnityEditor.Rendering.PostProcessing
public override void OnInspectorGUI()
{
- if (!SystemInfo.supportsComputeShaders || EditorUtilities.isTargetingWebGL)
+ if (!SystemInfo.supportsComputeShaders)
{
EditorGUILayout.HelpBox("Auto exposure requires compute shader support which is not available on this platform.", MessageType.Error);
}
+ else if (EditorUtilities.isTargetingWebGL)
+ {
+ EditorGUILayout.HelpBox("Auto exposure requires compute shader support (WebGPU) when running on Web.", MessageType.Warning);
+ }
else if (EditorUtilities.isTargetingAndroid)
{
EditorGUILayout.HelpBox("Auto exposure requires compute shader support (Vulkan) when running on Android.", MessageType.Warning);
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/AmbientOcclusion.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/AmbientOcclusion.cs
index afffab9..ae5d00e 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/AmbientOcclusion.cs
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/AmbientOcclusion.cs
@@ -196,7 +196,7 @@ namespace UnityEngine.Rendering.PostProcessing
state &= SystemInfo.supportsComputeShaders
&& !RuntimeUtilities.isAndroidOpenGL
- && !RuntimeUtilities.isWebGL
+ && !RuntimeUtilities.isWebNonWebGPU
#if UNITY_2023_2_OR_NEWER
&& SystemInfo.IsFormatSupported(GraphicsFormat.R32_SFloat, GraphicsFormatUsage.Render)
&& SystemInfo.IsFormatSupported(GraphicsFormat.R16_SFloat, GraphicsFormatUsage.Render)
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/AutoExposure.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/AutoExposure.cs
index 7a0e933..7995cdc 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/AutoExposure.cs
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/AutoExposure.cs
@@ -85,7 +85,7 @@ namespace UnityEngine.Rendering.PostProcessing
return enabled.value
&& SystemInfo.supportsComputeShaders
&& !RuntimeUtilities.isAndroidOpenGL
- && !RuntimeUtilities.isWebGL
+ && !RuntimeUtilities.isWebNonWebGPU
&& RenderTextureFormat.RFloat.IsSupported()
&& context.resources.computeShaders.autoExposure
&& context.resources.computeShaders.exposureHistogram;
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/MultiScaleVO.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/MultiScaleVO.cs
index a1af379..42719df 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/MultiScaleVO.cs
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/MultiScaleVO.cs
@@ -1,4 +1,5 @@
using System;
+using UnityEngine.Experimental.Rendering;
namespace UnityEngine.Rendering.PostProcessing
{
@@ -53,6 +54,10 @@ namespace UnityEngine.Rendering.PostProcessing
// command buffer warning
RenderTexture m_AmbientOnlyAO;
+ RenderTextureFormat m_R8Format;
+ RenderTextureFormat m_R16Format;
+ bool float4Texture = false;
+
readonly RenderTargetIdentifier[] m_MRT =
{
BuiltinRenderTextureType.GBuffer0, // Albedo, Occ
@@ -62,6 +67,46 @@ namespace UnityEngine.Rendering.PostProcessing
public MultiScaleVO(AmbientOcclusion settings)
{
m_Settings = settings;
+ // R16 is not supported on all platforms as a storage texture format
+ // R8 is not supported on all platforms as a storage texture format
+ m_R8Format = RenderTextureFormat.R8;
+ m_R16Format = RenderTextureFormat.RHalf;
+#if UNITY_2023_2_OR_NEWER
+ if (!SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(m_R8Format, false), GraphicsFormatUsage.LoadStore))
+ {
+ if (SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(RenderTextureFormat.ARGB32, false), GraphicsFormatUsage.LoadStore))
+ {
+ m_R8Format = RenderTextureFormat.ARGB32;
+ float4Texture = true;
+ }
+ }
+
+ if (!SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(m_R16Format, false), GraphicsFormatUsage.LoadStore))
+ {
+ if (SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(RenderTextureFormat.RFloat, false), GraphicsFormatUsage.LoadStore))
+ {
+ m_R16Format = RenderTextureFormat.RFloat;
+ }
+ }
+
+#else
+ if (!SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(m_R8Format, false), FormatUsage.LoadStore))
+ {
+ if (SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(RenderTextureFormat.ARGB32, false), FormatUsage.LoadStore))
+ {
+ m_R8Format = RenderTextureFormat.ARGB32;
+ float4Texture = true;
+ }
+ }
+
+ if (!SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(m_R16Format, false), FormatUsage.LoadStore))
+ {
+ if (SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(RenderTextureFormat.RFloat, false), FormatUsage.LoadStore))
+ {
+ m_R16Format = RenderTextureFormat.RFloat;
+ }
+ }
+#endif
}
public DepthTextureMode GetCameraFlags()
@@ -237,26 +282,26 @@ namespace UnityEngine.Rendering.PostProcessing
}
else
{
- Alloc(cmd, ShaderIDs.LinearDepth, MipLevel.Original, RenderTextureFormat.RHalf, true, dynamicResolutionEnabled);
+ Alloc(cmd, ShaderIDs.LinearDepth, MipLevel.Original, m_R16Format, true, dynamicResolutionEnabled);
Alloc(cmd, ShaderIDs.LowDepth1, MipLevel.L1, RenderTextureFormat.RFloat, true, dynamicResolutionEnabled);
Alloc(cmd, ShaderIDs.LowDepth2, MipLevel.L2, RenderTextureFormat.RFloat, true, dynamicResolutionEnabled);
Alloc(cmd, ShaderIDs.LowDepth3, MipLevel.L3, RenderTextureFormat.RFloat, true, dynamicResolutionEnabled);
Alloc(cmd, ShaderIDs.LowDepth4, MipLevel.L4, RenderTextureFormat.RFloat, true, dynamicResolutionEnabled);
- AllocArray(cmd, ShaderIDs.TiledDepth1, MipLevel.L3, RenderTextureFormat.RHalf, true, dynamicResolutionEnabled);
- AllocArray(cmd, ShaderIDs.TiledDepth2, MipLevel.L4, RenderTextureFormat.RHalf, true, dynamicResolutionEnabled);
- AllocArray(cmd, ShaderIDs.TiledDepth3, MipLevel.L5, RenderTextureFormat.RHalf, true, dynamicResolutionEnabled);
- AllocArray(cmd, ShaderIDs.TiledDepth4, MipLevel.L6, RenderTextureFormat.RHalf, true, dynamicResolutionEnabled);
+ AllocArray(cmd, ShaderIDs.TiledDepth1, MipLevel.L3, m_R16Format, true, dynamicResolutionEnabled);
+ AllocArray(cmd, ShaderIDs.TiledDepth2, MipLevel.L4, m_R16Format, true, dynamicResolutionEnabled);
+ AllocArray(cmd, ShaderIDs.TiledDepth3, MipLevel.L5, m_R16Format, true, dynamicResolutionEnabled);
+ AllocArray(cmd, ShaderIDs.TiledDepth4, MipLevel.L6, m_R16Format, true, dynamicResolutionEnabled);
- Alloc(cmd, ShaderIDs.Occlusion1, MipLevel.L1, RenderTextureFormat.R8, true, dynamicResolutionEnabled);
- Alloc(cmd, ShaderIDs.Occlusion2, MipLevel.L2, RenderTextureFormat.R8, true, dynamicResolutionEnabled);
- Alloc(cmd, ShaderIDs.Occlusion3, MipLevel.L3, RenderTextureFormat.R8, true, dynamicResolutionEnabled);
- Alloc(cmd, ShaderIDs.Occlusion4, MipLevel.L4, RenderTextureFormat.R8, true, dynamicResolutionEnabled);
+ Alloc(cmd, ShaderIDs.Occlusion1, MipLevel.L1, m_R8Format, true, dynamicResolutionEnabled);
+ Alloc(cmd, ShaderIDs.Occlusion2, MipLevel.L2, m_R8Format, true, dynamicResolutionEnabled);
+ Alloc(cmd, ShaderIDs.Occlusion3, MipLevel.L3, m_R8Format, true, dynamicResolutionEnabled);
+ Alloc(cmd, ShaderIDs.Occlusion4, MipLevel.L4, m_R8Format, true, dynamicResolutionEnabled);
- Alloc(cmd, ShaderIDs.Combined1, MipLevel.L1, RenderTextureFormat.R8, true, dynamicResolutionEnabled);
- Alloc(cmd, ShaderIDs.Combined2, MipLevel.L2, RenderTextureFormat.R8, true, dynamicResolutionEnabled);
- Alloc(cmd, ShaderIDs.Combined3, MipLevel.L3, RenderTextureFormat.R8, true, dynamicResolutionEnabled);
+ Alloc(cmd, ShaderIDs.Combined1, MipLevel.L1, m_R8Format, true, dynamicResolutionEnabled);
+ Alloc(cmd, ShaderIDs.Combined2, MipLevel.L2, m_R8Format, true, dynamicResolutionEnabled);
+ Alloc(cmd, ShaderIDs.Combined3, MipLevel.L3, m_R8Format, true, dynamicResolutionEnabled);
}
}
@@ -292,12 +337,11 @@ namespace UnityEngine.Rendering.PostProcessing
cmd.SetComputeTextureParam(cs, kernel, "LinearZ", ShaderIDs.LinearDepth);
cmd.SetComputeTextureParam(cs, kernel, "DS2x", ShaderIDs.LowDepth1);
- cmd.SetComputeTextureParam(cs, kernel, "DS4x", ShaderIDs.LowDepth2);
cmd.SetComputeTextureParam(cs, kernel, "DS2xAtlas", ShaderIDs.TiledDepth1);
- cmd.SetComputeTextureParam(cs, kernel, "DS4xAtlas", ShaderIDs.TiledDepth2);
cmd.SetComputeVectorParam(cs, "ZBufferParams", CalculateZBufferParams(camera));
cmd.SetComputeTextureParam(cs, kernel, "Depth", depthMapId);
-
+ cmd.SetComputeTextureParam(cs, kernel, "DS4x", ShaderIDs.LowDepth2);
+ cmd.SetComputeTextureParam(cs, kernel, "DS4xAtlas", ShaderIDs.TiledDepth2);
cmd.DispatchCompute(cs, kernel, m_ScaledWidths[(int)MipLevel.L4], m_ScaledHeights[(int)MipLevel.L4], 1);
if (needDepthMapRelease)
@@ -384,7 +428,9 @@ namespace UnityEngine.Rendering.PostProcessing
// Set the arguments for the render kernel.
var cs = m_Resources.computeShaders.multiScaleAORender;
- int kernel = isMSAA ? cs.FindKernel("MultiScaleVORender_MSAA_interleaved") : cs.FindKernel("MultiScaleVORender_interleaved");
+ string kernelName = isMSAA ? "MultiScaleVORender_MSAA_interleaved" : "MultiScaleVORender_interleaved";
+ if (float4Texture) kernelName += "_Float4";
+ int kernel = cs.FindKernel(kernelName);
cmd.SetComputeFloatParams(cs, "gInvThicknessTable", m_InvThicknessTable);
cmd.SetComputeFloatParams(cs, "gSampleWeightTable", m_SampleWeightTable);
@@ -411,17 +457,27 @@ namespace UnityEngine.Rendering.PostProcessing
int kernel = 0;
if (!isMSAA)
{
- kernel = cs.FindKernel(highResAO == null ? invert
+ string kernelName = highResAO == null ? invert
? "MultiScaleVOUpSample_invert"
: "MultiScaleVOUpSample"
- : "MultiScaleVOUpSample_blendout");
+ : "MultiScaleVOUpSample_blendout";
+ if (float4Texture)
+ {
+ kernelName += "_Float4";
+ }
+ kernel = cs.FindKernel(kernelName);
}
else
{
- kernel = cs.FindKernel(highResAO == null ? invert
+ string kernelName = highResAO == null ? invert
? "MultiScaleVOUpSample_MSAA_invert"
: "MultiScaleVOUpSample_MSAA"
- : "MultiScaleVOUpSample_MSAA_blendout");
+ : "MultiScaleVOUpSample_MSAA_blendout";
+ if (float4Texture)
+ {
+ kernelName += "_Float4";
+ }
+ kernel = cs.FindKernel(kernelName);
}
@@ -491,8 +547,7 @@ namespace UnityEngine.Rendering.PostProcessing
if (AOUpdateNeeded)
{
RuntimeUtilities.Destroy(m_AmbientOnlyAO);
-
- m_AmbientOnlyAO = new RenderTexture(context.width, context.height, 0, RenderTextureFormat.R8, RenderTextureReadWrite.Linear)
+ m_AmbientOnlyAO = new RenderTexture(context.width, context.height, 0, m_R8Format, RenderTextureReadWrite.Linear)
{
hideFlags = HideFlags.DontSave,
filterMode = FilterMode.Point,
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Monitors/Monitor.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Monitors/Monitor.cs
index fbcbb21..0e5d1a8 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Monitors/Monitor.cs
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Monitors/Monitor.cs
@@ -48,7 +48,7 @@ namespace UnityEngine.Rendering.PostProcessing
return requested
&& SystemInfo.supportsComputeShaders
&& !RuntimeUtilities.isAndroidOpenGL
- && !RuntimeUtilities.isWebGL
+ && !RuntimeUtilities.isWebNonWebGPU
&& ShaderResourcesAvailable(context);
}
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs
index 994bc63..509dd5b 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs
@@ -265,7 +265,9 @@ namespace UnityEngine.Rendering.PostProcessing
#if UNITY_2019_1_OR_NEWER
// We always use a CommandBuffer to blit to the final render target
// OnRenderImage is used only to avoid the automatic blit from the RenderTexture of Camera.forceIntoRenderTexture to the actual target
+#if !UNITY_EDITOR
[ImageEffectUsesCommandBuffer]
+#endif
void OnRenderImage(RenderTexture src, RenderTexture dst)
{
if (finalBlitToCameraTarget && !m_CurrentContext.stereoActive && DynamicResolutionAllowsFinalBlitToCameraTarget())
@@ -472,6 +474,10 @@ namespace UnityEngine.Rendering.PostProcessing
#endif
}
}
+ else
+ {
+ m_Camera.nonJitteredProjectionMatrix = m_Camera.projectionMatrix;
+ }
#if (ENABLE_VR_MODULE && ENABLE_VR)
if (m_Camera.stereoEnabled)
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Utils/RuntimeUtilities.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Utils/RuntimeUtilities.cs
index 405921b..459cca0 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Utils/RuntimeUtilities.cs
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Utils/RuntimeUtilities.cs
@@ -862,14 +862,28 @@ namespace UnityEngine.Rendering.PostProcessing
/// Returns true if the target platform is WebGL,
/// false otherwise.
///
- public static bool isWebGL
+ public static bool isWebNonWebGPU
{
- get {
-#if UNITY_WEBGL
+ get
+ {
+#if UNITY_EDITOR
+ #if UNITY_WEBGL
+ #if UNITY_2023_2_OR_NEWER
+ return PlayerSettings.GetGraphicsAPIs(BuildTarget.WebGL).First() != GraphicsDeviceType.WebGPU;
+ #else
return true;
-#else
+ #endif
+ #else
return false;
+ #endif
+#else
+ return Application.platform == RuntimePlatform.WebGLPlayer
+ #if UNITY_2023_2_OR_NEWER
+ && SystemInfo.graphicsDeviceType != GraphicsDeviceType.WebGPU
+ #endif
+ ;
#endif
+
}
}
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/ACES.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/ACES.hlsl
index 9f77efe..1405bb9 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/ACES.hlsl
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/ACES.hlsl
@@ -220,7 +220,9 @@ half3 ACES_to_ACEScc(half3 x)
x = clamp(x, 0.0, HALF_MAX);
// x is clamped to [0, HALF_MAX], skip the <= 0 check
- return (x < 0.00003051757) ? (log2(0.00001525878 + x * 0.5) + 9.72) / 17.52 : (log2(x) + 9.72) / 17.52;
+ return half3((x.x < 0.00003051757) ? (log2(0.00001525878 + x.x * 0.5) + 9.72) / 17.52 : (log2(x.x) + 9.72) / 17.52,
+ (x.y < 0.00003051757) ? (log2(0.00001525878 + x.y * 0.5) + 9.72) / 17.52 : (log2(x.y) + 9.72) / 17.52,
+ (x.z < 0.00003051757) ? (log2(0.00001525878 + x.z * 0.5) + 9.72) / 17.52 : (log2(x.z) + 9.72) / 17.52);
/*
return half3(
@@ -678,7 +680,9 @@ half roll_white_fwd(
half3 linear_to_sRGB(half3 x)
{
- return (x <= 0.0031308 ? (x * 12.9232102) : 1.055 * pow(x, 1.0 / 2.4) - 0.055);
+ return half3(x.x <= 0.0031308 ? (x.x * 12.9232102) : 1.055 * pow(x.x, 1.0 / 2.4) - 0.055,
+ x.y <= 0.0031308 ? (x.y * 12.9232102) : 1.055 * pow(x.y, 1.0 / 2.4) - 0.055,
+ x.z <= 0.0031308 ? (x.z * 12.9232102) : 1.055 * pow(x.z, 1.0 / 2.4) - 0.055);
}
half3 linear_to_bt1886(half3 x, half gamma, half Lw, half Lb)
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/API/WebGPU.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/API/WebGPU.hlsl
new file mode 100644
index 0000000..1982bcb
--- /dev/null
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/API/WebGPU.hlsl
@@ -0,0 +1,52 @@
+#define UNITY_UV_STARTS_AT_TOP 1
+#define UNITY_REVERSED_Z 1
+#define UNITY_GATHER_SUPPORTED (SHADER_TARGET >= 50)
+#define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1
+
+#define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName
+#define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName
+
+#define TEXTURE2D(textureName) Texture2D textureName
+#define SAMPLER2D(samplerName) SamplerState samplerName
+
+#define TEXTURE3D(textureName) Texture3D textureName
+#define SAMPLER3D(samplerName) SamplerState samplerName
+
+#define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName
+#define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName
+
+#define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName
+#define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName
+
+#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
+#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
+
+#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
+
+#define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0))
+#define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod))
+
+#define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2)
+#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
+#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
+#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
+
+#define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r
+#define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r
+
+#define UNITY_BRANCH [branch]
+#define UNITY_FLATTEN [flatten]
+#define UNITY_UNROLL [unroll]
+#define UNITY_LOOP [loop]
+#define UNITY_FASTOPT [fastopt]
+
+#define CBUFFER_START(name) cbuffer name {
+#define CBUFFER_END };
+
+#if UNITY_GATHER_SUPPORTED
+ #define FXAA_HLSL_5 1
+ #define SMAA_HLSL_4_1 1
+#else
+ #define FXAA_HLSL_4 1
+ #define SMAA_HLSL_4 1
+#endif
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/API/WebGPU.hlsl.meta b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/API/WebGPU.hlsl.meta
new file mode 100644
index 0000000..e4d7e2c
--- /dev/null
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/API/WebGPU.hlsl.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 9597bf0cd70376447ace14a366b40fe8
+ShaderIncludeImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/FinalPass.shader b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/FinalPass.shader
index 879b7f7..17c9853 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/FinalPass.shader
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/FinalPass.shader
@@ -99,7 +99,7 @@ Shader "Hidden/PostProcessing/FinalPass"
Pass
{
HLSLPROGRAM
- #pragma exclude_renderers gles vulkan switch
+ #pragma exclude_renderers gles vulkan webgpu switch
#pragma multi_compile __ STEREO_INSTANCING_ENABLED STEREO_DOUBLEWIDE_TARGET
#pragma target 5.0
@@ -115,7 +115,7 @@ Shader "Hidden/PostProcessing/FinalPass"
Pass
{
HLSLPROGRAM
- #pragma exclude_renderers gles vulkan switch
+ #pragma exclude_renderers gles vulkan webgpu switch
#pragma multi_compile __ STEREO_INSTANCING_ENABLED STEREO_DOUBLEWIDE_TARGET
#pragma target 3.0
@@ -147,7 +147,7 @@ Shader "Hidden/PostProcessing/FinalPass"
Pass
{
HLSLPROGRAM
- #pragma only_renderers gles vulkan switch
+ #pragma only_renderers gles vulkan webgpu switch
#pragma multi_compile __ STEREO_DOUBLEWIDE_TARGET //not supporting STEREO_INSTANCING_ENABLED
ENDHLSL
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVODownsample1.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVODownsample1.compute
index 2fdb6c7..4e63737 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVODownsample1.compute
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVODownsample1.compute
@@ -29,11 +29,11 @@
#ifdef MSAA
// Output textures
+RWTexture2D DS4x;
+RWTexture2DArray DS4xAtlas;
RWTexture2D LinearZ;
RWTexture2D DS2x;
RWTexture2DArray DS2xAtlas;
-RWTexture2D DS4x;
-RWTexture2DArray DS4xAtlas;
// Input textures
Texture2D Depth;
@@ -42,11 +42,11 @@ Texture2D Depth;
groupshared float2 g_CacheW[256];
#else
// Output textures
+RWTexture2D DS4x;
+RWTexture2DArray DS4xAtlas;
RWTexture2D LinearZ;
RWTexture2D DS2x;
RWTexture2DArray DS2xAtlas;
-RWTexture2D DS4x;
-RWTexture2DArray DS4xAtlas;
// Input textures
Texture2D Depth;
@@ -122,7 +122,6 @@ void main(uint3 Gid : SV_GroupID, uint GI : SV_GroupIndex, uint3 GTid : SV_Group
uint slice = ((st.x & 3) | (st.y << 2)) & 15;
DS2x[st] = w1;
DS2xAtlas[uint3(st >> 2, slice)] = w1;
-
if ((GI & 011) == 0)
{
st = DTid.xy >> 1;
@@ -130,7 +129,6 @@ void main(uint3 Gid : SV_GroupID, uint GI : SV_GroupIndex, uint3 GTid : SV_Group
DS4x[st] = w1;
DS4xAtlas[uint3(st >> 2, slice)] = w1;
}
-
}
#endif
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVORender.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVORender.compute
index f4cab26..033941d 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVORender.compute
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVORender.compute
@@ -27,6 +27,12 @@
#pragma kernel MultiScaleVORender_MSAA MAIN=MultiScaleVORender_MSAA MSAA
#pragma kernel MultiScaleVORender_MSAA_interleaved MAIN=MultiScaleVORender_MSAA_interleaved MSAA INTERLEAVE_RESULT
+#pragma kernel MultiScaleVORender_Float4 MAIN=MultiScaleVORender_Float4 FLOAT4
+#pragma kernel MultiScaleVORender_interleaved_Float4 MAIN=MultiScaleVORender_interleaved_Float4 INTERLEAVE_RESULT FLOAT4
+#pragma kernel MultiScaleVORender_MSAA_Float4 MAIN=MultiScaleVORender_MSAA_Float4 MSAA FLOAT4
+#pragma kernel MultiScaleVORender_MSAA_interleaved_Float4 MAIN=MultiScaleVORender_MSAA_interleaved_Float4 MSAA INTERLEAVE_RESULT FLOAT4
+
+
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl"
#ifndef INTERLEAVE_RESULT
@@ -68,7 +74,11 @@
#endif
// Output texture
+#ifdef FLOAT4
+ RWTexture2D Occlusion;
+#else
RWTexture2D Occlusion;
+#endif
// Shared memory
groupshared float DepthSamples[TILE_DIM * TILE_DIM];
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVOUpsample.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVOUpsample.compute
index 6835f4e..2d29efa 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVOUpsample.compute
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/MultiScaleVOUpsample.compute
@@ -34,6 +34,19 @@
#pragma kernel MultiScaleVOUpSample_MSAA_blendout MAIN=MultiScaleVOUpSample_MSAA_blendout MSAA BLEND_WITH_HIGHER_RESOLUTION
#pragma kernel MultiScaleVOUpSample_MSAA_premin_blendout MAIN=MultiScaleVOUpSample_MSAA_premin_blendout MSAA COMBINE_LOWER_RESOLUTIONS BLEND_WITH_HIGHER_RESOLUTION
+#pragma kernel MultiScaleVOUpSample_Float4 MAIN=MultiScaleVOUpSample_Float4 FLOAT4
+#pragma kernel MultiScaleVOUpSample_invert_Float4 MAIN=MultiScaleVOUpSample_invert_Float4 INVERT FLOAT4
+#pragma kernel MultiScaleVOUpSample_premin_Float4 MAIN=MultiScaleVOUpSample_premin_Float4 COMBINE_LOWER_RESOLUTIONS FLOAT4
+#pragma kernel MultiScaleVOUpSample_blendout_Float4 MAIN=MultiScaleVOUpSample_blendout_Float4 BLEND_WITH_HIGHER_RESOLUTION FLOAT4
+#pragma kernel MultiScaleVOUpSample_premin_blendout_Float4 MAIN=MultiScaleVOUpSample_premin_blendout_Float4 COMBINE_LOWER_RESOLUTIONS BLEND_WITH_HIGHER_RESOLUTION FLOAT4
+
+#pragma kernel MultiScaleVOUpSample_MSAA_Float4 MAIN=MultiScaleVOUpSample_MSAA_Float4 FLOAT4
+#pragma kernel MultiScaleVOUpSample_MSAA_invert_Float4 MAIN=MultiScaleVOUpSample_MSAA_invert_Float4 MSAA INVERT FLOAT4
+#pragma kernel MultiScaleVOUpSample_MSAA_premin_Float4 MAIN=MultiScaleVOUpSample_MSAA_premin_Float4 MSAA COMBINE_LOWER_RESOLUTIONS FLOAT4
+#pragma kernel MultiScaleVOUpSample_MSAA_blendout_Float4 MAIN=MultiScaleVOUpSample_MSAA_blendout_Float4 MSAA BLEND_WITH_HIGHER_RESOLUTION FLOAT4
+#pragma kernel MultiScaleVOUpSample_MSAA_premin_blendout_Float4 MAIN=MultiScaleVOUpSample_MSAA_premin_blendout_Float4 MSAA COMBINE_LOWER_RESOLUTIONS BLEND_WITH_HIGHER_RESOLUTION FLOAT4
+
+
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl"
@@ -67,7 +80,11 @@
#endif
// Ouput textures
+ #ifdef FLOAT4
+ RWTexture2D AoResult;
+ #else
RWTexture2D AoResult;
+ #endif
// Shared memory
groupshared float DepthCache[256];
@@ -416,15 +433,41 @@ void MAIN(uint3 Gid : SV_GroupID, uint GI : SV_GroupIndex, uint3 GTid : SV_Group
int2 OutST = DTid.xy << 1;
#ifdef INVERT
- AoResult[OutST + int2(-1, 0)] = 1.0 - BilateralUpsample(HiDepths.x, HiSSAOs.x, LoDepths.xyzw, LoSSAOs.xyzw);
- AoResult[OutST + int2( 0, 0)] = 1.0 - BilateralUpsample(HiDepths.y, HiSSAOs.y, LoDepths.yzwx, LoSSAOs.yzwx);
- AoResult[OutST + int2( 0, -1)] = 1.0 - BilateralUpsample(HiDepths.z, HiSSAOs.z, LoDepths.zwxy, LoSSAOs.zwxy);
- AoResult[OutST + int2(-1, -1)] = 1.0 - BilateralUpsample(HiDepths.w, HiSSAOs.w, LoDepths.wxyz, LoSSAOs.wxyz);
+ float x = 1.0 - BilateralUpsample(HiDepths.x, HiSSAOs.x, LoDepths.xyzw, LoSSAOs.xyzw);
+ float y = 1.0 - BilateralUpsample(HiDepths.y, HiSSAOs.y, LoDepths.yzwx, LoSSAOs.yzwx);
+ float z = 1.0 - BilateralUpsample(HiDepths.z, HiSSAOs.z, LoDepths.zwxy, LoSSAOs.zwxy);
+ float w = 1.0 - BilateralUpsample(HiDepths.w, HiSSAOs.w, LoDepths.wxyz, LoSSAOs.wxyz);
+
+ #ifdef FLOAT4
+ AoResult[OutST + int2(-1, 0)] = float4(x, x, x, x);
+ AoResult[OutST + int2(0, 0)] = float4(y, y, y, y);
+ AoResult[OutST + int2(0, -1)] = float4(z, z, z, z);
+ AoResult[OutST + int2(-1, -1)] = float4(w, w, w, w);
+ #else
+ AoResult[OutST + int2(-1, 0)] = x;
+ AoResult[OutST + int2(0, 0)] = y;
+ AoResult[OutST + int2(0, -1)] = z;
+ AoResult[OutST + int2(-1, -1)] = w;
+ #endif
+
#else
- AoResult[OutST + int2(-1, 0)] = BilateralUpsample(HiDepths.x, HiSSAOs.x, LoDepths.xyzw, LoSSAOs.xyzw);
- AoResult[OutST + int2( 0, 0)] = BilateralUpsample(HiDepths.y, HiSSAOs.y, LoDepths.yzwx, LoSSAOs.yzwx);
- AoResult[OutST + int2( 0, -1)] = BilateralUpsample(HiDepths.z, HiSSAOs.z, LoDepths.zwxy, LoSSAOs.zwxy);
- AoResult[OutST + int2(-1, -1)] = BilateralUpsample(HiDepths.w, HiSSAOs.w, LoDepths.wxyz, LoSSAOs.wxyz);
+ float x = BilateralUpsample(HiDepths.x, HiSSAOs.x, LoDepths.xyzw, LoSSAOs.xyzw);
+ float y = BilateralUpsample(HiDepths.y, HiSSAOs.y, LoDepths.yzwx, LoSSAOs.yzwx);
+ float z = BilateralUpsample(HiDepths.z, HiSSAOs.z, LoDepths.zwxy, LoSSAOs.zwxy);
+ float w = BilateralUpsample(HiDepths.w, HiSSAOs.w, LoDepths.wxyz, LoSSAOs.wxyz);
+
+ #ifdef FLOAT4
+ AoResult[OutST + int2(-1, 0)] = float4(x, x, x, x);
+ AoResult[OutST + int2(0, 0)] = float4(y, y, y, y);
+ AoResult[OutST + int2(0, -1)] = float4(z, z, z, z);
+ AoResult[OutST + int2(-1, -1)] = float4(w, w, w, w);
+ #else
+ AoResult[OutST + int2(-1, 0)] = x;
+ AoResult[OutST + int2(0, 0)] = y;
+ AoResult[OutST + int2(0, -1)] = z;
+ AoResult[OutST + int2(-1, -1)] = w;
+ #endif
+
#endif
#endif
}
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/Uber.shader b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/Uber.shader
index 8da2f91..2a0191e 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/Uber.shader
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Builtins/Uber.shader
@@ -275,7 +275,7 @@ Shader "Hidden/PostProcessing/Uber"
Pass
{
HLSLPROGRAM
- #pragma exclude_renderers gles vulkan switch
+ #pragma exclude_renderers gles vulkan webgpu switch
#pragma multi_compile __ COLOR_GRADING_LDR_2D COLOR_GRADING_HDR_2D COLOR_GRADING_HDR_3D
#pragma multi_compile __ STEREO_INSTANCING_ENABLED STEREO_DOUBLEWIDE_TARGET
@@ -290,7 +290,7 @@ Shader "Hidden/PostProcessing/Uber"
Pass
{
HLSLPROGRAM
- #pragma only_renderers vulkan switch
+ #pragma only_renderers vulkan webgpu switch
#pragma multi_compile __ COLOR_GRADING_LDR_2D COLOR_GRADING_HDR_2D COLOR_GRADING_HDR_3D
#pragma multi_compile __ STEREO_DOUBLEWIDE_TARGET // disabled for Vulkan because of shader compiler issues in older Unity versions: STEREO_INSTANCING_ENABLED
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Colors.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Colors.hlsl
index 5a25c30..8990830 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Colors.hlsl
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/Colors.hlsl
@@ -179,7 +179,7 @@ half3 SRGBToLinear(half3 c)
#else
half3 linearRGBLo = c / 12.92;
half3 linearRGBHi = PositivePow((c + 0.055) / 1.055, half3(2.4, 2.4, 2.4));
- half3 linearRGB = (c <= 0.04045) ? linearRGBLo : linearRGBHi;
+ half3 linearRGB = half3((c.x <= 0.04045) ? linearRGBLo.x : linearRGBHi.x, (c.y <= 0.04045) ? linearRGBLo.y : linearRGBHi.y, (c.z <= 0.04045) ? linearRGBLo.z : linearRGBHi.z);
return linearRGB;
#endif
}
@@ -212,7 +212,7 @@ half3 LinearToSRGB(half3 c)
#else
half3 sRGBLo = c * 12.92;
half3 sRGBHi = (PositivePow(c, half3(1.0 / 2.4, 1.0 / 2.4, 1.0 / 2.4)) * 1.055) - 0.055;
- half3 sRGB = (c <= 0.0031308) ? sRGBLo : sRGBHi;
+ half3 sRGB = half3((c.x <= 0.0031308) ? sRGBLo.x : sRGBHi.x, (c.y <= 0.0031308) ? sRGBLo.y : sRGBHi.y, (c.z <= 0.0031308) ? sRGBLo.z : sRGBHi.z);
return sRGB;
#endif
}
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/StdLib.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/StdLib.hlsl
index 01501ec..9259be0 100644
--- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/StdLib.hlsl
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/StdLib.hlsl
@@ -27,6 +27,8 @@
#include "API/Metal.hlsl"
#elif defined(SHADER_API_PSP2)
#include "API/PSP2.hlsl"
+#elif defined(SHADER_API_WEBGPU)
+ #include "API/WebGPU.hlsl"
#else
#include "API/OpenGL.hlsl"
#endif
diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Textures/Cubes/.gitignore b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Textures/Cubes/.gitignore
new file mode 100644
index 0000000..d5db9bc
--- /dev/null
+++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Textures/Cubes/.gitignore
@@ -0,0 +1,2 @@
+*.asset
+*.asset.meta
diff --git a/Packages/com.unity.postprocessing@3.2.2/package.json b/Packages/com.unity.postprocessing@3.2.2/package.json
index 6b5ef79..6d0688d 100644
--- a/Packages/com.unity.postprocessing@3.2.2/package.json
+++ b/Packages/com.unity.postprocessing@3.2.2/package.json
@@ -1,6 +1,6 @@
{
"name": "com.unity.postprocessing",
- "version": "3.3.1",
+ "version": "3.4.0",
"displayName": "Post Processing",
"unity": "2019.4",
"unityRelease": "19f1",