The WHY of my question
I thought the eye refraction and caustics on the iris were automatic from the Eye shader model. After messing with Iris Mask and Iris Distance parameters and seeing no difference at all I went through the Character map on the Content Examples project and saw the whole bunch of math (still trying to understand it) that takes to make the effect seen on Paragon characters and shown on Twitch stream. I believe, if it takes that whole bunch of instructions AND for specific UVs, the new Eye shader model is not very versatile. I can’t even reuse the EyeRefraction function from that shader, since it’s specific for that model and those UVs.
I’m sure I’m wrong and it could be versatile with the right math. But it’s still too complex for me to do it by myself.
So, my questions are…
- Will there be some documentation on how to reproduce, at least, the refraction effect with any UV mapping?
- If those effects don’t come automatically, what is different about the Eye Shader Model?
Update: caustics are, indeed, automatic! 8D
Looking around the M_EyeRefractive Material from Content Examples, I’ve noticed the use of world space normals outputting to Tangent. I found no documentation nor forum pages about that Tangent Output node, but I suppose it’s related to the Vertex shader tangents. After creating a world space normal texture for my eye mesh, the Iris Distance parameter, together with the Iris Mask, started making the caustics effect on the Iris. I just had to find the right value for Iris Distance (0.433 in my case).
It raised another question: Why does both Eye and Hair shader Materials are using that Tangent Output node? It did make a huge difference on my hair shader, also.