Skip to content

Conversation

kecho
Copy link
Contributor

@kecho kecho commented Sep 14, 2021

Purpose of this PR

https://fogbugz.unity3d.com/f/cases/1365098/

Lens flare was not binding global _CameraDepthTexture. This was sometimes left over bound as pyramid depth, which does not contain transparent depth geometry.
This could cause issues & inconsistencies between gameview (with full post process stack) & sceneview (no dof).

This was easily reproducible, by just adding transparent geo and a lens flare. If we enable "Depth Write" we expect the glass to occlude the lens flare. The expectation was otherwise not happening.


Testing status

Created a scene with a piece of glass and lens flare sun. Made the glass to have "Depth Write". Expected to have the lens flare occluded.

image

Before:
image

After:
image


Comments to reviewers

Notes for the reviewers you have assigned.

@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://yamato.cds.internal.unity3d.com/jobs/902-Graphics
Search for your PR branch using the sidebar on the left, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

HDRP
/.yamato%252Fall-hdrp.yml%2523PR_HDRP_trunk
With changes to HDRP packages, you should also run
/.yamato%252Fall-lightmapper.yml%2523PR_LightMapper_trunk

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@kecho kecho requested a review from skhiat September 14, 2021 22:30
@tlaedre
Copy link
Contributor

tlaedre commented Sep 15, 2021

Fix verified in demo project.

@kecho kecho force-pushed the HDRP/correct-depth-transparent-lens-flare branch from 10023f0 to 8b50519 Compare September 15, 2021 13:09
@kecho kecho requested a review from a team September 15, 2021 16:26
@kecho kecho marked this pull request as ready for review September 15, 2021 16:26
@github-actions github-actions bot added the HDRP label Sep 15, 2021
@kecho kecho force-pushed the HDRP/correct-depth-transparent-lens-flare branch from 8b50519 to 029ae5d Compare September 16, 2021 14:16
Copy link
Contributor

@JMargevics JMargevics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@sebastienlagarde sebastienlagarde merged commit 56b7b16 into master Sep 20, 2021
@sebastienlagarde sebastienlagarde deleted the HDRP/correct-depth-transparent-lens-flare branch September 20, 2021 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants