Announcement

Collapse
No announcement yet.

Fresnel equation transfer to fx shader

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fresnel equation transfer to fx shader

    Dear users,

    does anybody know how I can convert the vray reflection parameters into a fresnel equation on a fx shader?

    Let's say I have a reflection of reflectColor RGB (255 255 255) with a fresnel reflection and an Index of Reflection of 1.6 in the vray material. When I look on the material preview, I have little reflection looking from the front and much (the reflectColor) when looking from the side (fresnel effect).

    Now, the fx formula for fresnel looks like this:

    reflection_factor = fresMin + fresScale * pow(1.0 - abs (dot(V, N), fresExpon));

    I understand that fresScale could be the reflectColor mentioned above. fresExpon could be the IOR of 1.6? But how do I calculate fresMin?

    And what happens to colors that are "colored", not just grayscale but with a tone? How do I calculate this on top of a reflection cube map and parallely get the fresnel out of it?

    Would be helpful if anybody would answer.

    Thank you much!
    Robert

    Max, VRay, Fusion:

    https://www.youtube.com/watch?v=g5fSLrVzpxg
    https://www.youtube.com/watch?v=bpmJgTb_9Ro
Working...
X