Skip to content

Conversation

hkr
Copy link
Contributor

@hkr hkr commented Aug 16, 2021

Purpose of this PR

Fix case 1351020


Testing status

Manual


Comments to reviewers

With 3 component normal maps it's easily possible to get near-zero-length normals after filtering.
Combined with normalization in fp16 this can cause sporadic Inf/NaN which then spreads with post processing effects like Bloom when rendering to a floating point framebuffer.
With DXT5nm this cannot happen because the decoding always makes sure that the length is 1.
It would probably be possible to sanitize normals during import but this is much easier and XYZ normal maps are legacy anyway.

@hkr hkr requested a review from ellioman August 16, 2021 20:57
@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)

URP
/.yamato%252Fall-urp.yml%2523PR_URP_2021.2

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.

@ellioman ellioman requested a review from a team August 18, 2021 09:19
@hkr hkr marked this pull request as ready for review August 23, 2021 15:31
@hkr hkr requested a review from a team as a code owner August 23, 2021 15:31
@hkr hkr merged commit 9b13da8 into master Aug 30, 2021
@hkr hkr deleted the urp/android/fix-normal-map-nan branch August 30, 2021 18: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.

3 participants