Unity 5 - Shader error in VertexBlend : Too many output registers declared (12). How to fix it?

Hi!
I upgraded a project to Unity 5, I had the usual " variable not fully initialized" error in a lot of shader, I fixed it by adding
UNITY_INITIALIZE_OUTPUT(Input, o);
No problem.
But now I have a shader that blends 2 * (diffuse+normal) texture pairs based on a blend texture I got a strange error.
The shader only throws the error when in playmode.
The shader error:

Shader error in 'VertexBlend': Too many output registers declared (12).  When no output register has been declared with the semantic 'psize0', 11 o# registers are available.  When an o# register has been declared with the semantic 'psize0' (same as 'psize'), 12 registers are available. at line 192 (on d3d9)

Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF FOG_EXP2 VERTEXLIGHT_ON

It seems to work, but I am affraid it will break on some mobile devices.
Can anyone tall me what is wrong? What should I change to make it work?

My vert output structure:

struct Input {
float2 uv_MainTex : TEXCOORD0;
float2 uv_Diffuse2 : TEXCOORD1;
float2 uv_BlendMask : TEXCOORD2;
float4 color : COLOR;
float2 uv_Normal1 : TEXCOORD3;
float2 uv_Normal2 : TEXCOORD4;
			};

Thanks!

Hi Borissow,

Depending on the platform/shader model targeted the amount of output register available are different. Furthermore the packing can have a great importance too.

Shader model 3.0 doc → 1 pos register, 1 scalar point size register, 10 general purpose register.
Shader model 4.0 doc → 16 all purpose register

So i suppose in your case you can probably pack things up to use fewer register, or increase the target shader language (and min spec of your project ?).

PS : Additionally on some hardware you will have a performance gain at packing stuff.

Hope it helps

Florent