TressFX Reloaded!

Hey there,

I’ve recently seen the TressFX 3.0 Slides from the new Deus Ex game, and they really impressed me.
I thought about my tressfx – unity integration project a bit and decided to go over the code again to try fix atleast some of the problems i’ve had.

So, i cloned the git-repo, opened unity and the fun began 🙂
The only real big problem with it was that the fragment sorting was not working correctly.

In the fragment shader where i collect all fragments of the final rendered hair i used the linear eye depth instead of the real world depth as sorting and world position depth.
This mistake caused the final fragment sorter pass to sort the fragments in a wrong order and also the re-calculation of the world position won’t work correctly.

For now, i’m saving a fragments viewprojection multiplicated world depth AND x and y position (which is not really good as it uses much ram), but i’ll change that later. For now it’s ok.

So, right now i think i got a fully featured tressfx implementation in Unity3D.
Mgear on the unity forums also fixed the compute shader compilation on unity 5 and my new target version now is also unity 5, the unity 4 version wont get any updates anymore from me.

So, for the future i want to improve the integration into unity’s editor and the hair mesh creation.
I’ll work together with Lee Perry-Smith from
He provides me some demo models and data files to work with for improving the whole project, so thanks to him :>

Finally, here are some screenshots from the current TressFX project:

I also had the same code working on Unity 4 and there are big rendering differences from unity 4 to 5, overall it looks MUCH nicer than with 4.
I don’t exactly know why, but i like it 🙂