Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 2649ebe

Browse files
committed
Merge remote-tracking branch 'refs/remotes/Unity-Technologies/master'
2 parents 225dfd1 + 9bbdf47 commit 2649ebe

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

PostProcessing/Resources/Shaders/Uber.shader

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ Shader "Hidden/Post FX/Uber Shader"
2222
#pragma multi_compile __ EYE_ADAPTATION
2323
#pragma multi_compile __ CHROMATIC_ABERRATION
2424
#pragma multi_compile __ DEPTH_OF_FIELD DEPTH_OF_FIELD_COC_VIEW
25-
#pragma multi_compile __ BLOOM
26-
#pragma multi_compile __ BLOOM_LENS_DIRT
25+
#pragma multi_compile __ BLOOM BLOOM_LENS_DIRT
2726
#pragma multi_compile __ COLOR_GRADING COLOR_GRADING_LOG_VIEW
2827
#pragma multi_compile __ USER_LUT
2928
#pragma multi_compile __ GRAIN
@@ -218,7 +217,7 @@ Shader "Hidden/Post FX/Uber Shader"
218217
#endif
219218

220219
// HDR Bloom
221-
#if BLOOM
220+
#if BLOOM || BLOOM_LENS_DIRT
222221
{
223222
half3 bloom = UpsampleFilter(_BloomTex, i.uvFlippedSPR, _BloomTex_TexelSize.xy, _Bloom_Settings.x) * _Bloom_Settings.y;
224223
color += bloom;

PostProcessing/Runtime/Components/BloomComponent.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ public void Prepare(RenderTexture source, Material uberMaterial, Texture autoExp
129129
context.renderTextureFactory.Release(prefiltered);
130130

131131
// Push everything to the uber material
132-
uberMaterial.EnableKeyword("BLOOM");
133132
uberMaterial.SetTexture(Uniforms._BloomTex, bloomTex);
134133
uberMaterial.SetVector(Uniforms._Bloom_Settings, new Vector2(sampleScale, bloom.intensity));
135134

@@ -139,6 +138,10 @@ public void Prepare(RenderTexture source, Material uberMaterial, Texture autoExp
139138
uberMaterial.SetFloat(Uniforms._Bloom_DirtIntensity, lensDirt.intensity);
140139
uberMaterial.EnableKeyword("BLOOM_LENS_DIRT");
141140
}
141+
else
142+
{
143+
uberMaterial.EnableKeyword("BLOOM");
144+
}
142145
}
143146
}
144147
}

PostProcessing/Runtime/PostProcessingBehaviour.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public class PostProcessingBehaviour : MonoBehaviour
1717
public PostProcessingProfile profile;
1818

1919
public Func<Vector2, Matrix4x4> jitteredMatrixFunc;
20-
Matrix4x4 nonJitteredProjectionMatrix;
2120

2221
// Internal helpers
2322
Dictionary<Type, KeyValuePair<CameraEvent, CommandBuffer>> m_CommandBuffers;
@@ -155,10 +154,7 @@ void OnPreCull()
155154

156155
// Temporal antialiasing jittering, needs to happen before culling
157156
if (!m_RenderingInSceneView && m_Taa.active && !profile.debugViews.willInterrupt)
158-
{
159-
nonJitteredProjectionMatrix = m_Context.camera.projectionMatrix;
160157
m_Taa.SetProjectionMatrix(jitteredMatrixFunc);
161-
}
162158
}
163159

164160
void OnPreRender()
@@ -182,7 +178,7 @@ void OnPostRender()
182178
return;
183179

184180
if (!m_RenderingInSceneView && m_Taa.active && !profile.debugViews.willInterrupt)
185-
m_Context.camera.projectionMatrix = nonJitteredProjectionMatrix;
181+
m_Context.camera.ResetProjectionMatrix();
186182
}
187183

188184
// Classic render target pipeline for RT-based effects

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Post-processing Stack (beta)
1+
# Post-processing Stack
22

33
Need help ? Check out the [quick start guide](https://github.com/Unity-Technologies/PostProcessing/wiki) and [the official forums](https://forum.unity3d.com/forums/image-effects.96/) !
44

0 commit comments

Comments
 (0)