When you want to transform the normal to world-space, the correct way would be to use the inverse transpose of the world-matrix. That's it in HLSL:

Code:
float4 worldNormal = mul(matWorldInv, inNormal);