Download

Visualize Fresnel?

Hello,

How can I visualize Fresnel? the Specular visualizer doesn’t show the Fresnel/specular gain on extreme angles.

Thanks in advance.

Short answer: You can’t.
Long answer:

You can create a post process material with a custom node with 3 inputs(SpecularColor,L , V), that contains this code:


float3 H = normalize(V + L);
float VoH = saturate( dot(V, H) );
float Fc = Pow5( 1 - VoH );					
return saturate( 50.0 * SpecularColor.g ) * Fc + (1 - Fc) * SpecularColor;

Where,

SpecularColor - SceneTexture:SpecularColor
L - direction of the light
V - view direction

You can debug a single directional light like this. Gotta add a bit if you need other types or cubemap.

Question is, do you really need to visualize that Fresnel term?

Thanks. But that’s not related to the material Fresnel?
What I’m trying to do is to make some adjustments to the material Fresnel i.e Multiplying AO by Fresnel for a brick material. But there doesn’t seem to be any control regarding that?