Fix shader crash when using Normal debug mode with a normal map


When DebugSettings.Normals is active, the pass requirements only set
needsWorldNormal, but not needsWorldTangent/needsWorldBinormal. However,
normal/bump map sampling uses the TBN matrix (qt_tangent, qt_binormal)
to transform the sampled normal to world space. This caused a shader
compilation crash with 'qt_tangent: undeclared identifier'.

The fix adds a guard (similar to the parallax mapping fix) that ensures
tangent and binormal are always requested when a normal map is present
and the world normal is needed.

Fixes: QTBUG-145057
Pick-to: 6.11
Change-Id: I5137f2a9e08163b033942e83edc07cfeaef1769e
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Andrei Yankovich <EndrIIMail@gmail.com>
commitea9686f5a3327cf06ab33281dd613fe20f900d68
parenta8b10b2167b3ca94231e326e3a5b82824f541131
authorAndy Nichols <andy.nichols@qt.io>
committerAndy Nichols <andy.nichols@qt.io>
commit timeMon, 30 Mar 2026 12:08:01 +0100