CFTD [4] HDRP
Production-Grade, P****erformant Crack-Free Tessellation Displacement Shader for Unity 's HDRP
The only crack-free tessellation displacement solution for Unity’s HDRP (as of mid 2020)
CFTD [4] HDRP is here. Again, re-written from the ground up!
CFTD 4.0 HDRP (Jun 2020)
- CFTD supports HDPR 7.3.1 +
- Lit Variant support only.
- Tested on DirectX 11 / 12.
CFTD
Crack-Free Tessellation Displacement for the Unity Standard Rendering Path
The only crack-free tessellation displacement solution for Unity. Current version: 2.2
Asset Store Link
Documentation (Standard RP)
Demo Scene (Outdated, Demo Scene was made with CFTD 1.x)
NEW VERSION: CFTD 2.0 has been re-written from the ground up!
New in CFTD 2.2 (Jun 2020)
- CFTD now supports Vulkan.
- Improved mesh swimming reduction (displacement miplod).
- Better support for baked displacement maps.
New in CFTD 2.1 (Jul 2018):
- OpenGL 4.5 support (the shader might possibly support other platforms as well, such as GLES 3 in Unity 2018); Please note, only OpenGL 4.5 on Windows has been tested.
- Further performance improvements.
New in CFTD 2.0:
- Supports PN-AEN Tessellation (adds geometric detail and smooths meshes, while persevering hard edges).
- Supports GPU Instancing (helps with reducing batches).
- Full support for Unity’s PBR workflow.
- Better shader performance.
- AAA, industry-grade reduction of adaptive tessellation artifacts (an issue known as ‘mesh swimming’).
What exactly is CFTD?
Crack-Free Tessellation Displacement (CFTD) is a set of tessellation shaders designed to patch ‘cracks’ that occur when displacement is applied to a model with UV discontinuities. I.e., if your model’s texture does not tile perfectly, this will result in displacement cracks on the edges where the tiling breaks. That’s because the displacement values at the neighboring texels would be different. Fixing this issue requires extra calculations and an extra buffer to store all the data. Luckily, CFTD does exactly that.
Limitations:
- CFTD does not support skinned meshes(you can apply the shader, but it will not be crack-free).
- DirectX 11 /12 PC, OpenGl, Vulkan tested only (Metal has not been tested).
- Cracks are gone at runtime only.
- No static / dynamic batching.
- Tessellation is a somewhat slow technique.
Features and generally good stuff:
- Unity’s first (and only) crack-free tessellation shader. Patches edges at UV discontinuities.
- Smooths normals on the edges between smoothing groups (hard edges) in a very neat and unique way (Distance Based).
- FOV-dependent (Edge Length). I.e. supports camera zooming-in.
- Shadow caster LOD (as of 2.0 in Deferred Rendering only). You can optimize tessellation on the real time shadow caster.
- Works with your existing assets.
- Casts and receives full shadows & Supports Unity’s GI…
- CFTD includes a static subdivider to imrpove tesselation on very low-poly meshes.
CFTD comes in tow variants (each with or without PN_AEN): Edge Length & Distance Based.
Distance Based:
- Smooth fading of tessellation and displacement with distance. No popping and strange stuff when far, looks good up close.
- Smooths normals on the patched edges. This feature is pretty unique. Haven’t seen any other shader do that, even in UE4.
Edge Length (notice the hard edges) / Distance Based (smooth between different smoothing groups)
Edge Length:
- Tessellate tris based on desired pixel size. Improves “mesh swimming”.
- Uses its own tessellator. While the technique is close to Unity’s own, it’s a bit faster and incorporates the tessellation culling that the original Unity Edge Length tessellator did not.
- FOV - dependent: When you zoom in with the camera, tessellation is a applied normally.
Here is an example of the FOV dependence of Distance Based. In this example, the camera is way far from the mesh and has a FOV of 3 (almost orthographic projection).
Distance Based (tessellation and displacement are gone!) / Edge Length (all works fine!)
Please leave a rating and/or a review.
Thank you for viewing!