after writing a some forward shading code (for use with transparent stuff) and comparing it with deferred shaded models I noticed, that the specular highlights differ if the model is scaled. The bigger the scale, the more apparent the difference. I believe the forward shaded model looks wrong. A little bit as if the highlights are calculated for the unscaled model.
All lighting calculations happen in object space, so scale should be accounted for.
I'll post some shader code, just in case someone notices a faulty piece right away.
//vertex shaderVS_Output_Nm output; output.pos = mul(float4(pos, 1.f), g_worldViewProj);output.tex = tex;float3 pnorm = 2.f * (normal.xyz - 0.5f);float3 ptan = 2.f * (tan.xyz - 0.5f);float3x3 tangentSpace = float3x3(ptan, normalize(tan.w * cross(pnorm, ptan)), pnorm);//g_lightDir and g_eyePos are in object-spaceoutput.light = mul(tangentSpace, g_lightDir);float3 eyeDir = mul(tangentSpace, normalize(g_eyePos - pos));output.halfVec = eyeDir + output.light; return output; //pixel shaderfloat3 normal = 2.f * (g_texture1.Sample(g_anisoSampler, input.tex).rgb - 0.5f);return lighting(normalize(normal), normalize(input.light), normalize(input.halfVec), input.tex);float3 lighting(float3 normal, float3 light, float3 halfAngle, float2 tex){ float diffuse = dot(normal, light); float backDiffuse = max(-diffuse, 0.f) * g_translucency; diffuse = max(diffuse, 0.f) + backDiffuse; float reflection = max(dot(normal, halfAngle), 0.f); float3 specular = pow(reflection, g_specularExponent * 255.f) * g_specularColor; float3 baseColor = g_opacity * g_texture0.Sample(g_anisoSampler, tex).rgb; return g_lightColor * (diffuse * baseColor + specular);}