outDiffuseColor = float3(0,0,0);
float3 normal = normalize(
	(tex2D( Tex0, inTex0.xy + float2(0.01125,0.03144) * gInstanceData[0].x ).rgb * 2 - 1) +
	(tex2D( Tex0, inTex0.xy + float2(-0.04125,0.01144) * gInstanceData[0].x ).rgb * 2 - 1)
);
outNormal = mul( -normal, TBN );
float fresnel = 1 - abs( dot( outNormal, normalize(viewPos) ) );
outOpacity = 0.2 * saturate( 1 - length( viewPos ) / 100 );
outDistortion = outNormal.xy * 0.1 / inViewPos.z;
outSpecularColor = float3( 0.5, 0.5, 0.5 ) * lerp( 0.5, 1, fresnel * fresnel );
outSpecularPower = 256;
outAmbientDiffuseLight = float4( 0.22, 0.35, 0.46, 1 );
outAmbientSpecularLight = tex2D( Tex1, projPos.xy / projPos.w * float2(-0.5,-0.5) + 0.5 );
