Search Issue Tracker

By Design

Votes

1

Found in

5.0.0b22

Issue ID

669554

Regression

No

[ImageEffects] Shaders that rely on HDR produce overly large results in highlights

Shaders

-

How to reproduce:

1. Open attached project (or stripped project from the Cloud)
2. Open scene Scenes/Moba.unity
3. Open quality settings and disable anti-aliasing
4. Move the Main Camera on the X axis
- Notice how the bloom and lens dirtiness effects get really big and stand out too much. This does not happen if HDR is disabled.

- By Design: What is happening is that the standard shader is generating some very bright pixels. This can happen when one has bright lighting and high specularity. If only a small portion of the model is visible it can lead to there being maybe one or two pixels with the colour that are very bright, this in turn creates big bloom sections and flickering.

When doing rendering in LDR, the brightest a pixel can be is 1. The render pipeline clamps the value to this as values >1 can not be written to the framebuffer. When you enable HDR you are basically allowing the really bright pixels to smudge much further over the screen before their value drops below the bloom cutoff threshold.

There are three ways this can be fixed:
- Modify the assets to not generate such bright highlights (not really a good solution. PBR rendering does have downsides)
- Clamp the value that is being bloomed (insert something like this in the bloom shader: color = clamp(0, 3.0, color); when reading from the original texture)
- Get the new bloom effect we are developing here: https://bitbucket.org/Unity-Technologies/cinematic-image-effects It has an 'anti-flicker' option that will fix most of the pixel overbright bloom sections. As a note, remember that in HDR bloom WILL be brighter as you have more to blur before dropping below the cutoff. It might be worth raising it a tad.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.