Skip to content

Commit

Permalink
Fixed Deferred Fog does not work in XR single pass (Unity-Technologie…
Browse files Browse the repository at this point in the history
…s#6842)

* * Added missing XR macros for deferred fog pass.

* * Updated CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Felipe Lira <felipedrl@gmail.com>
  • Loading branch information
thomas-zeng and phi-lira committed Feb 10, 2022
1 parent 039a8f6 commit 83978c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions com.unity.render-pipelines.universal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed material converter not being able to be called in batch mode. [case 1375962]
- Fixed an issue where specular color was not matching behaviour in Legacy and HDRP. [case 1326941](https://issuetracker.unity3d.com/issues/urp-specular-color-behavior-does-not-match-legacy-or-hdrp)
- Fixed a shader compiler issue with mismatching variable types when calling lerp.
- Fixed URP Deferred Fog pass does not work in XR singlepass. [case 1390236](https://issuetracker.unity3d.com/product/unity/issues/guid/1390236/)
- Fixed an issue where preview cameras were missing the descriptor for creating their RenderTexture [case 1393818](https://issuetracker.unity3d.com/issues/urp-errors-are-spammed-after-entering-play-mode-in-sunflare-scene-and-navigating-the-project-view)
- Fixed max light count cpu/gpu mismatch on Windows Editor with Android target. [case 1392965](https://issuetracker.unity3d.com/product/unity/issues/guid/1392965/)
- Fixed missing shader keyword SHADOWS_SHADOWMASK for shader graph using deferred rendering.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ Shader "Hidden/Universal Render Pipeline/StencilDeferred"

half4 FragFog(Varyings input) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);

#if _RENDER_PASS_ENABLED
float d = LOAD_FRAMEBUFFER_INPUT(GBUFFER3, input.positionCS.xy).x;
#else
Expand All @@ -345,6 +347,8 @@ Shader "Hidden/Universal Render Pipeline/StencilDeferred"

half4 FragSSAOOnly(Varyings input) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);

float2 screen_uv = (input.screenUV.xy / input.screenUV.z);
AmbientOcclusionFactor aoFactor = GetScreenSpaceAmbientOcclusion(screen_uv);
half surfaceDataOcclusion = SAMPLE_TEXTURE2D_X_LOD(_GBuffer1, my_point_clamp_sampler, screen_uv, 0).a;
Expand Down

0 comments on commit 83978c1

Please sign in to comment.