TressFX icon indicating copy to clipboard operation
TressFX copied to clipboard

support inverted depth

Open mrgreywater opened this issue 8 years ago • 2 comments

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

mrgreywater avatar Mar 14 '16 19:03 mrgreywater

Good point. We will add this to the backlog.

jstewart-amd avatar Mar 16 '16 02:03 jstewart-amd

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.

mrgreywater avatar Dec 05 '16 19:12 mrgreywater