TressFX
TressFX copied to clipboard
support inverted depth
TressFX currently uses D3D11_COMPARISON_LESS_EQUAL for z-order comparison. [Reference]
The z-ordering should be optionally D3D11_COMPARISON_GREATER_EQUAL; either via preprocessor definition or TressFX_Desc option. This also requires changes to make sure the ordering of transparent hair strands works correctly.
rationale: Many engines used in popular games (including GTA V, Witcher 3, Just Cause 2) use inverted (and sometimes logarithmic) depth buffers to increase depth precision. See
Good point. We will add this to the backlog.
Since I haven't heard back from you but need this feature for my next project, I started implementing it here: https://github.com/mrgreywater/TressFX/commit/116150b37358b0fd6b9f61b6cf9a5741d279ee6f (F5 to toggle inverse depth)
Inverse depth is working for the default configuration, but it doesn't yet support ShortCut or inverting the shadow maps.