const char *skin_vert_src =
"void main(\n"
"	float3 in_pos,\n"
"	float3 in_normal,\n"
"	fixed4 in_color,\n"
"	half2 in_tex0,\n"
"	float4 in_weights,\n"
"	float4 in_indices,\n"
"	uniform float4x4 u_wvp,\n"
"	uniform float4x4 u_world,\n"
"	uniform half4 u_ambLight,\n"
"	uniform half4 u_surfProps,\n"
"	uniform half4 u_fogData,\n"
"	uniform half4 u_matColor,\n"
"	uniform half4 u_lightParams[MAX_LIGHTS],\n"
"	uniform half4 u_lightDirection[MAX_LIGHTS],\n"
"	uniform half4 u_lightColor[MAX_LIGHTS],\n"
"	uniform float4x4 u_boneMatrices[64],\n"
"	half4 out v_color : COLOR0,\n"
"	half2 out v_tex0 : TEXCOORD0,\n"
"	fixed out v_fog : FOG,\n"
"	float4 out gl_Position : POSITION\n"
") {\n"
"	float4x4 Skin = u_boneMatrices[(int)in_indices.x] * in_weights.x\n"
"		+ u_boneMatrices[(int)in_indices.y] * in_weights.y\n"
"		+ u_boneMatrices[(int)in_indices.z] * in_weights.z\n"
"		+ u_boneMatrices[(int)in_indices.w] * in_weights.w;\n"
"	\n"	
"	float3 SkinVertex = (mul(float4(in_pos, 1.f), Skin)).xyz;\n"
"	float3 SkinNormal = (mul(float4(in_normal, 0.f), Skin)).xyz;\n"
"	\n"
"	gl_Position = mul(float4(SkinVertex, 1.0), u_wvp);\n"
"	float3 Normal = mul(SkinNormal, float3x3(u_world));\n"

"	v_tex0 = in_tex0;\n"

"	v_color = in_color;\n"
"	v_color.rgb += u_ambLight.rgb*surfAmbient;\n"
"	\n"
"	half3 color = half3(0.0, 0.0, 0.0);\n"
"	for(int i = 0; i < MAX_LIGHTS; i++){\n"
"		if(u_lightParams[i].x == 0.0)\n"
"			break;\n"
"		if(u_lightParams[i].x == 1.0){\n"
"			// direct\n"
"			fixed l = max(0.0, dot(Normal, -u_lightDirection[i].xyz));\n"
"			color += l*u_lightColor[i].rgb;\n"
"		}\n"
"	}\n"
"	\n"
"	v_color.rgb += color*surfDiffuse;\n"
"	v_color = clamp(v_color, 0.0, 1.0);\n"
"	v_color *= u_matColor;\n"

"	v_fog = DoFog(gl_Position.z, u_fogData);\n"
"}\n"
;
