<p>I think this question is a bit tricky to answer, since I have some seemingly contradictory knowledge about your implementation. If I recall correctly, you are using Schlick approximation for the Fresnel term, which is:</p>
<ul>
<li>Used for physically based anisotropic surface reflection, like <a href="https://collections.lib.utah.edu/dl_files/77/ea/77eac0c124401e935d08fd9208b98c0990cb078c.pdf" rel="nofollow noreferrer">FresnelBlend BRDF</a>, which matches closely with your code (the difference is that Blinn-Phong is replaced by microfacet distribution). This BRDF looks metallic and of course, it is used to model metallic surfaces.</li>
<li>Schlick approximation is designed for dieletric materials (glass / water, etc.), since conductor (metal) has different way to compute Fresnel term. The indices of refraction are simply (literally) complex. There are some paper stating that Schlick approximation produces erroneous results and should only be used for non-conductor surfaces.</li>
</ul>
<p>You see how things contradict here. I guess the answer for your question is:</p>
<ul>
<li>If you want to model metallic (<strong>metal-like</strong>) surface, Schlick approximation (and hence your code) does make sense.</li>
<li>If you want to model metal (exact definition): no, it is not suggested to model metal this way. You can refer to <a href="https://www.pbr-book.org/3ed-2018/Reflection_Models/Specular_Reflection_and_Transmission" rel="nofollow noreferrer">PBR-Book 8.2.1 Specular Reflection and Transmission</a> for the modeling of conductor material.</li>
</ul>
<p>For the specific implementation (and possible bugs): why do you call this function <code>sample</code>? This looks like <code>evaluation</code> to me since you are not sampling Fresnel term or Blinn-Phong BRDF but evaluating them. This is minor though so you can ignore it.</p>

CC BY-SA 4.0
2023-09-25T21:37:16.613Z
Thank you very much :)
TheChamp
CC BY-SA 4.0
2023-09-25T02:14:04.383Z
2023-09-25T02:14:04.383Z
Enigmatisms
<p>I am implementing fresnel reflections for materials in my renderer.<br />
<strong>Does it make sense for metals?</strong></p>
<p>Here my implementation:</p>
<pre><code>float BlinnPhong(const DistributionFunction::SampleInput&amp; input, float shininess)
{
    const float normalizationFactor = (shininess + 8.0f) * Math::InvPi8.getValue();
    return std::pow(input.HoN, shininess) * normalizationFactor;
}

float ComputeFresnel0(float ior)
{
    return std::powf((ior - 1.0f) / (ior + 1.0f), 2.0f);
}

float ComputeFresnel(float F0, float HoV)
{
    return F0 + (1.0f - F0) * pow(1.0f - HoV, 5.0f);
}  

// Here: the sampling function.
RGBFColor SampleMetalBrdf(const DistributionFunction::SampleInput&amp; sampleInput)
{
    static const float ior = 1.5f;
    const float F0 = ComputeFresnel0(ior);
    const float fresnel = ComputeFresnel(F0, sampleInput.HoV);  

    static const float shininess = 120.0f;
    const float specularFactor = BlinnPhong(sampleInput, shininess);

    static const RGBFColor baseColor = RGBFColor(1.0f);

    return baseColor * specularFactor * fresnel * sampleInput.NoL; // Multiply by distSampleInput.NoL here for purpose. 
}
</code></pre>

<brdf><pbr><specular><fresnel>
Does fresnel reflection make sense for metals?
TheChamp
# Does fresnel reflection make sense for metals?

(Asked by: username_0 on 2023-09-24)

I am implementing fresnel reflections for materials in my renderer.  
**Does it make sense for metals?**

Here my implementation:

```
float BlinnPhong(const DistributionFunction::SampleInput& input, float shininess)
{
    const float normalizationFactor = (shininess + 8.0f) * Math::InvPi8.getValue();
    return std::pow(input.HoN, shininess) * normalizationFactor;
}

float ComputeFresnel0(float ior)
{
    return std::powf((ior - 1.0f) / (ior + 1.0f), 2.0f);
}

float ComputeFresnel(float F0, float HoV)
{
    return F0 + (1.0f - F0) * pow(1.0f - HoV, 5.0f);
}  

// Here: the sampling function.
RGBFColor SampleMetalBrdf(const DistributionFunction::SampleInput& sampleInput)
{
    static const float ior = 1.5f;
    const float F0 = ComputeFresnel0(ior);
    const float fresnel = ComputeFresnel(F0, sampleInput.HoV);  

    static const float shininess = 120.0f;
    const float specularFactor = BlinnPhong(sampleInput, shininess);

    static const RGBFColor baseColor = RGBFColor(1.0f);

    return baseColor * specularFactor * fresnel * sampleInput.NoL; // Multiply by distSampleInput.NoL here for purpose. 
}

```

**Tags:** brdf, pbr, specular, fresnel


---

## 1 answers

### Answer by username_1 on 2023-09-25. Score: 3 | Accepted answer

I think this question is a bit tricky to answer, since I have some seemingly contradictory knowledge about your implementation. If I recall correctly, you are using Schlick approximation for the Fresnel term, which is:

* Used for physically based anisotropic surface reflection, like [FresnelBlend BRDF](https://collections.lib.utah.edu/dl_files/77/ea/77eac0c124401e935d08fd9208b98c0990cb078c.pdf), which matches closely with your code (the difference is that Blinn-Phong is replaced by microfacet distribution). This BRDF looks metallic and of course, it is used to model metallic surfaces.
* Schlick approximation is designed for dieletric materials (glass / water, etc.), since conductor (metal) has different way to compute Fresnel term. The indices of refraction are simply (literally) complex. There are some paper stating that Schlick approximation produces erroneous results and should only be used for non-conductor surfaces.

You see how things contradict here. I guess the answer for your question is:

* If you want to model metallic (**metal-like**) surface, Schlick approximation (and hence your code) does make sense.
* If you want to model metal (exact definition): no, it is not suggested to model metal this way. You can refer to [PBR-Book 8.2.1 Specular Reflection and Transmission](https://www.pbr-book.org/3ed-2018/Reflection_Models/Specular_Reflection_and_Transmission) for the modeling of conductor material.

For the specific implementation (and possible bugs): why do you call this function `sample`? This looks like `evaluation` to me since you are not sampling Fresnel term or Blinn-Phong BRDF but evaluating them. This is minor though so you can ignore it.

> **Comments:**
> **username_0**: Thank you very much :)  

---

