Hello. I am looking for a way to create tessellation shader which could work as common subdivision level,
for example I have got simple mesh with tessellation scale=1 (2 triangles):
and with tessellation scale=2 I could have this result (8 triangles):
and with tessellation scale=3 I could have 3x3x2=18 triangles etc.
I wonder how can I check triangle count when I apply tessellation shaders in Unity3d, for instance I use tessellation shader from Shader Forge and in active profiler window I can check only real amount of visible triangles from imported mesh without subdivided triangles (I can change tessellation scale and number of triangles is still the same).
Which kind of tessellation algorithm in Unity3D is used by default (flat, PN triangles, Phong) and is there formula for counting number of vertices for every tessellation scale factor ?
How can i combine this code with tessellation shaders from this thread:
I also tried to run this code:
but I have a lot of compile errors, for example:
Shader error in âTessellation/Vector Displacement Quadâ: undeclared identifier âpatchâ at line 140 (on d3d11) etc.
Someone brought this to my attention and I can confirm: my quad tessellation shader will not work in Unity 5. If more than a few people want this, I could re-visit and try to get it workingâŠ
Yeah I donât get it either. Iâve been considering reviving my quad tessellation shader, but havenât had the time. Iâll admit that itâs kind of a mess, and hard to hack on. I wasnât taking the project too seriously back when I first worked on it, since there was no way to import a mesh with quads through the normal importer. I had to hack my own OBJ parser to do it.
Now that we can âkeep quadsâ on import, this is a more viable asset for use within Unity. Hopefully Iâll be able to get this working again sometime soon on a rainy day
Hi, sorry to necrobump, but I am curious if this is the same thing? Also sorry if it is irrelevant, I am new to unity shaders, but I am looking for a place to learn, and I am wondering if something like this is resource intensive?