Module gl1

Class GLSLNormalMap


public class GLSLNormalMap extends GLSLChannelMapNode
GL1/GLSL code generator for NormalMap.

For Channel.NX requests, generates inline GLSL that:

  1. Samples the RGB tangent-space normal map texture.
  2. Decodes the texel from [0,1] to [-1,1].
  3. Builds an orthonormal TBN matrix from the surface tangent (dpdu), bitangent (dpdv) and normal.
  4. Transforms the decoded tangent-space normal to world space.
  5. Blends the result with the original normal using the NormalMap.getStrength() parameter.
All other channel requests are forwarded to the upstream channel map.
Author:
MH at YNL 2026