- Home /
Is DX11 tessellation bugged in Unity 2018? Image proof below!
I feel there is some sort of bug with shaders using DX11 on Unity 2018. I recently tried to update a volumetric lighting project of mine from 2017.2 to 2018.2. I make heavy use of quad tessellation and it seems to be flawed - my project completely breaks in 2018. The whole tessellation process along with hull and domain stages don't seem to do what they should. On 2018 versions there seem to always be more vertices than rendered. If one calls DrawProcedural using MeshTopology.Quads with 4096 vertices the frame debugger shows 6144 vertices drawn (the actual vertices needed to render the quads, using triangles). I set up a simple scene with a call to DrawProcedural and offsetting the vertices to see if the quad is indeed formed by two triangles. Unity 2017 greatly satisfies this whereas Unity 2018 has issues. I have attached two images for comparison. The quad is simply defined between x = [0,1] and y = [0,1] and z = 0. I have displaced the vertex (x,y) = (1,1) in the positive z direction by 1. In Unity 2017 the quad renders correctly whereas in Unity 2018 there is an intruder triangle defined by vertices (0,1), (1,0) and (0,0). This is extremely odd as these are the same shader and C# script running for both renders - the versions this was tested on are 2017.4.13f1 (working) and 2018.2.14f1 (not working).
Thank you to anyone who can shed light on this or even make a suggestion. Any help is greatly appreciated! If this is indeed a bug and not an oversight on my part, I will file a bug report! - Yours truly, Draugurinn