Using this (Unity - Manual: Surface Shaders with DX11 / OpenGL Core Tessellation) shader and realtime lighting works well, but baked lighting doesn’t. (The object just turns black)
Is there any way to include Lightmapping in Tessellation?
It doesn’t work at all anymore…
Just by copying the shader from the site I get this error:
Shader error in ‘Custom/Tesselation’: invalid subscript ‘texcoord1’ at line 150 (on d3d11)
(it just appeared right now - I haven’t got this error before)
I solved it by adding two sets of uvs to the input structure:
struct appdata {
float4 vertex : POSITION;
float4 tangent : TANGENT;
float3 normal : NORMAL;
float2 texcoord : TEXCOORD0;
float2 texcoord1 : TEXCOORD1;
float2 texcoord2 : TEXCOORD2;
};