Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix when camera is on the planar reflection plane #1818

Merged
merged 2 commits into from Sep 22, 2020

Conversation

adrien-de-tocqueville
Copy link
Contributor

Purpose of this PR

Fix for https://fogbugz.unity3d.com/f/cases/1276072/

When the camera is exactly on the planar reflection probe plane, the reflected camera has some weird values so I just offset the camera position along the mirror normal.

@FrancescoC-unity
Copy link
Contributor

Isn't this the same as #1537 ?

@adrien-de-tocqueville
Copy link
Contributor Author

adrien-de-tocqueville commented Sep 10, 2020

That seems related but I can't reproduce the bug you fixed when disabling your fix (I don't know what i'm doing wrong), so I don't know if mine would fix it too

Copy link
Contributor

@TomasKiniulis TomasKiniulis left a comment

Choose a reason for hiding this comment

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

This change seems to fix it. Checked repro project. Made sure that Out Of Frustum Errors do not occur baking Reflection Probe when:

  • Planar probe and reflection probe are at 0 Y coordinate, are shared above or below
  • Main Camera, Planar Probe, Reflection Probe share the exact same coordinate

nrAJFcfqHT

@sebastienlagarde sebastienlagarde merged commit 174d3c8 into HDRP/staging Sep 22, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/fix-camera-on-reflection-plane branch September 22, 2020 08:39
@sebastienlagarde sebastienlagarde mentioned this pull request Sep 22, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants