A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Shaders' started by segant, Jun 29, 2020.
Shader is different from directx. I used hlsl in shader. I think unity converts it wrong.
If you think shader compilation is incorrect, please submit a bug report.
Allright, I'll upload it today.
@aleksandrk I have uploaded it but forgot to tell. May I take some of your time ? Case 1259743
The bug will get processed by QA first, I'll take a look afterwards
@segant Hi! I finally managed to take a look at your bug report. This is caused by OpenGL and other APIs having different rules for selecting a provoking vertex (the vertex that defines the value for fragment shading when this value is not interpolated). For GL it's the last vertex, all other APIs use the first.
You can just change your geometry shader to output the ID of the first vertex for all three vertices you output there (e.g. o.vertexIdPassed=i.id;).