Skip to content

Commit bb86613

Browse files
committed
fix muticompile for motion blur without alpha
1 parent 22e238d commit bb86613

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

com.unity.render-pipelines.high-definition/Editor/Compositor/CompositorWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void MarkShaderAsDirty(Shader shader, object context)
150150
private void OnDestroy()
151151
{
152152
CompositionManager compositor = CompositionManager.GetInstance();
153-
if (compositor.shader != null)
153+
if (compositor && compositor.shader != null)
154154
{
155155
GraphData.onSaveGraph -= MarkShaderAsDirty;
156156
}

com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,7 @@ void DoMotionBlur(CommandBuffer cmd, HDCamera camera, RTHandle source, RTHandle
18151815
using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.MotionBlurKernel)))
18161816
{
18171817
cs = m_Resources.shaders.motionBlurCS;
1818+
cs.shaderKeywords = null;
18181819

18191820
CoreUtils.SetKeyword(cs, "ENABLE_ALPHA", m_EnableAlpha);
18201821
kernel = cs.FindKernel("MotionBlurCS");

com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/MotionBlur.compute

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
//#pragma enable_d3d11_debug_symbols
77

8-
#pragma multi_compile ENABLE_ALPHA
8+
#pragma multi_compile _ ENABLE_ALPHA
99

1010
RW_TEXTURE2D_X(CTYPE, _OutputTexture);
1111
TEXTURE2D_X(_InputTexture);

0 commit comments

Comments
 (0)