0
Solucionado

Fresnel and Refraction dont like each other

Pharaoh Zeus hace 9 años actualizado por Freya Holmér (Developer) hace 9 años 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!

Respuesta

+1
Respuesta
Solucionado

This has now been fixed in 1.25

+1
En revisión

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
Respuesta
Solucionado

This has now been fixed in 1.25