0
Fixed

Fresnel and Refraction dont like each other

Pharaoh Zeus 9 years ago updated by Freya Holmér (Developer) 9 years ago 3

Hey! Awesome asset!


I ran into a problem while creating a refractive material in the newest version of shader forge. I've checked a lot of documentation about making the material work (countless tutorials basically), and when I do what the tutor suggests, my shader returns pink with an error (about undeclared identifier 'viewDirection'.


Thanks in advance!

Answer

+1
Answer
Fixed

This has now been fixed in 1.25

+1
Under review

While waiting for this to be fixed, you might be able to pull this off using your own fresnel setup (Dot between view vector and normal vector, then a one-minus node, then a pow node).

Thank you for the quick reply!


..but the problem is still there.. It might have something to do with the shader not declaring viewDir soon enough?


+1
Answer
Fixed

This has now been fixed in 1.25