- Home /
Disable fresnel in standard shader
Hi!
I found out that the issue I am having might have to do with the standard fresnel that gets applied to an object when using the standard Unity shader.
Using the standard Unity shader, even when setting Smoothness/Metallicness to 0, there will still be a kind of reflective effect added to the material that is dependent on the POV from the camera.
I would like to not have that effect in my game, as I am going for a low poly minimalistic look. The only built-in material I have found in Unity which doesn't have this fresnel effect, is a VertexLit (only directional lights) mobile shader. But that means I can't make use of cookies (and probably other functionalities). Is there something I can change in the code of the shader to disable this effect? Or should I write my own shader?
I appreciate any and all suggestions!
EDIT: The effect I am talking about is the one you can see in this screenshot. The plane gets some kind of reflective gradient and moves with the camera. Maybe I was using the wrong term and this isn't fresnel after all?
i’d say build your own shader, or atleast search the web for the shader you’re looking for!
Answer by Namey5 · Aug 30, 2019 at 11:16 AM
Fresnel shading is an integral part of physically-based BRDFs (including the standard shader). No other shader in Unity takes fresnel into account, however, so you should be able to use the legacy diffuse/specular shaders in its place.
Then maybe the effect I'm talking about isn't fresnel after all? The effect I'm having a problem with is the one you see in this screenshot:
The gradient/reflection you see on the plane, depending on the distance to the camera, is something I do not want. The legacy shaders create this effect as well, except for the Diffuse Fast one, but that shader doesn't work with cookies.
I get what you mean - at first glance it definitely looks like some form of rim lighting. Have you tried disabling ambient lighting/changing to a solid colour rather than a gradient/skybox?
The reflection is still there when having no skybox material, and a solid ambient colour. I just can't figure out where it comes from.