Has anyone had any luck trying to get quad patch tessellation working in Unity? Triangle patch tessellation looks awful. Quad tessellation would make much better vertex distribution for things like heightmap tessellation but I can't seem to find a way to make quads when procedurally generating a mesh. Edit: I'm messing around with the hull shader trying to do silly things with triangles to "generate" a quad, but I can't even make a quad patch because I get the following errors: Code (csharp): struct PatchTess { float edges[4] : SV_TessFactor; float inside[2] : SV_InsideTessFactor; }; Is Unity artificially disabling quad patches?
Is there anyone that could provide some insight to this? How feasible would it be to create the shader inside a native plugin using C++? I'm only targeting PC, so I could start by just including the DX11 shader compiler. I'm not sure how to transfer over Unity's notions of shader passes or the macros Unity uses for Texture2DArrays. Luckily, I'm not using surfaces shaders. I just want this tessellation to look nicer. I can't do this in the geometry shader as I need the 64x64 tessellation that the tess shader can do. (Geom can maybe do 4x4). In fact, I don't actually need quads in the mesh. I just need quad patch support. I can very easily pack the data for the 4th vertex inside the first three vertices (it's just position and uv, being a heightmap)
Quad tessellation shader: https://github.com/przemyslawzaworski/Unity3D-CG-programming/blob/master/quad_tessellation.shader Remember, your imported mesh from modelling software also should has quad topology. And enable option "Keep quads" in model import settings. Shader works great with tested imported quad topology models from Modo.