Weird specular light reflection in Deferred rendering path

So I’ve recently moved my project from Unity 5.24 to Unity 5.6 and decided to switch to Deferred rendering path. I’ve discovered that under some lighting conditions my standard materials have and weird specular reflection that makes objects look plastic and reflect too much light. It doesn’t happen in Forward rendering path and it doesn’t happen in Unity 5.24. Look at the hunting rifle. Since deferred allows to view only specular reflections and can definitely say that this is specular reflection.

Forward 5.6

Deferred 5.6

Forward 5.6

Deferred 5.6

My first thought would be to check the smoothness of your materials. If you’re using a roughness map, make sure the texture is an appropriate format that supports alpha, and make sure the material is set to use the correct texture alpha.
Otherwise, I’m not sure; possibly something to do with the lights, or maybe effects on the camera.

I’ve spend hours adjusting material, but it can’t be fixed with material setup. It is possible to completey remove reflection by using Specular setup and black color for specular, but that is a bad option, cause has it’s own problems. It isn’t possible with metallic setup. I’ve tried it in different scenes, so I don’t think that it’s related and it isn’t related to camera effects, cause even when I disable them in scene view, the problem is there. And the most important part that everything looks fine in forward rendering path.

Hmm…
So, if it only occurs in the deferred rendering path, it must be something related to rendering which is not available in forward rendering. Still, the only thing that comes to mind is lighting settings. Check the scene’s lighting settings; global illumination, ambient lighting, etc. may be the culprit. Even if you’ve checked already, check again. May want to try creating a scene specifically for troubleshooting this (if you haven’t already) and try poking the lighting settings for the scene to see what changes.

I’ve made new project with a cube and problem is still there.

Here’s a demonstration of whole process with all settings (it’s only 2 minutes):

https://www.youtube.com/watch?v=ggVc5zTS4Dg

Here’s a link to the project: https://1drv.ms/u/s!AtLI8DR-wXnNj95bQmjaN6g8pMxwjA

And as you can see, there’s no difference in Unity 5.24 (this is how I want it to bee in Unity 5.6)

https://www.youtube.com/watch?v=Uxs5kGszseM

You just disabled GI in your 5.6 video; you didn’t touch any of the ambient lighting settings. Here’s an image showing some comparisons of different lighting settings in both forward and deferred, as well as a couple using the Standard (Specular Setup) shader.

Try toying with the settings shown/mentioned in my graphic. Generally speaking, the forward rendering path is a lower quality rendering pipeline. It seems as though it uses the Standard (Specular Setup) shader instead of the Standard shader. The difference is the “Standard” shader uses metallic and roughness PBR approach, whereas the “Standard (Specular Setup)” shader uses specular and glossiness PBR approach.

You might get better results by using the Standard (Specular Setup) shader with Deferred rendering path. With the deferred path, you can take advantage of higher quality graphics and higher quality effects.

Also, did you check the “Clear baked data” in the lighting window?

Not sure what you mean by lower quality.
One example to contradict your statement:
Forward = AA (better quality)
Deferred = no AA (lower quality). Can’t use unity fog. Can’t stack camera effects on multiple cameras. Can’t omit receiving shadows/reflection probes.

So I always thought Forward was the higher quality, deferred is for performance.

Forward can use the built-in MSAA, yes. But you’re forgetting the post processing stack. It offers FXAA and TAA.
Not sure what you mean by “stack camera effects on multiple cameras” or “can’t omit receiving shadows/reflection probes” though.
The forward rendering path is a lower quality rendering pipeline; deferred rendering offers better light/shadow quality. See here: https://docs.unity3d.com/Manual/RenderingPaths.html

For me changing those light settings makes no difference with metallic setup.

https://www.youtube.com/watch?v=yokNB0xQ8to

But I did made big progress. Checking those check boxes in material settings makes material produce equal visuals in deferred and forward. For both metallic and specular setup.

But I wonder, does this mean that those materials are now rendered using both forward while other objects are rendered using deferred when I choose deferred?

While I’m glad that I’ve discovered how to make those materials render identical in both forward and deferred. It actually doesn’t solve my problem, cause the only thing I did is that I’ve managed to add those ugly reflections to forward rendering.

Another contributing factor to “ugly reflection” is Linear color space. Unfortunately as far as I know, Gamma isn’t a good option for PBR.

So basically the problem is that material with smoothness 0 has too much specular reflection.

And yes, if I use specular setup with completely black specular (000000FF) there are no reflections, but as soon as soon as I change black color just a tiny bit, this extreme reflection is back.

So in the end, looks like I have same problem as described in this topic 5.3 Standard PBS is Wrong Cannot Eliminate/Remove Specular - Unity Engine - Unity Discussions

@Ar7ific1al , thanks for your answers! The helped me to do more tests and find core issue.

1 Like

I’ve never had any problems with gamma color space and PBR, personally. Then again, I usually don’t ever switch color space from gamma to linear. lol Pretty strange that your lighting settings aren’t affecting your scene.
Either way, I’m glad I was at least able to be of some help. :slight_smile: Even if I wasn’t able to pinpoint the exact cause of the problem. lol

One thing we’ve found is that reflection probe seems to quell the nasty ‘sheen’ you get on some materials within deferred rendering. The only problem I have personally is that the reflection probe seems to be using forward rendering, and is crippling performance whilst it is continually updating regardless of whether it is set to baked or dynamic.

Weird.