- Home /
Writing a dx11 tessellation shader.
I need to implement some slightly custom tessellation. And I can't do it with surface shaders (stop it with these code-hiding surface shaders already! >.<).
Specifically, I have PCG meshes with no uvs and no tangents but good smooth normals. On my own vertex and fragment CG shader, I implemented custom lighting, and am also doing triplanar projection to texture and bumpmap my mesh, and other procedural texture distortions.
But to implement tessellation I also need to approximate tangents somehow during some sort of tessellation geometry pass - and I know nothing about how or where this is implemented, and most importantly, is a manual implementation of this documented anywhere?
My idea was to try the GPU Gems book approach with swizzling normals to get tangents (ctrl+f this in gems: normal.z, normal.y, -normal.x) before the tessellator gets them. (Do you have any other ideas?)
Can anyone please share any sort of information / documentation / resources on tessellation?
PS: Since I must use my custom data structures with my own vert and frag functions, I need to translate the surf part of the tessellation shader I linked above, into vert+frag. - And how to do this, isn't documented anywhere by Unity.
Your answer