Normals
Normal mapping simulates fine surface details by modifying how light interacts with the surface at each pixel, without adding actual geometry.
Parameters
| Parameter | Type | Default | Range |
|---|---|---|---|
normalTexture | texture2d_ref | null | - |
flipNormalTextureGreenChannel | int32_t | 0 | 1 |
flipNormalTextureBlueChannel | int32_t | 0 | 1 |
Parameter Details
normalTexture
Type: texture2d_ref
Default: null
Format: RGB, Linear color space
Tangent-space normal map encoding surface detail.
- Channels: RGB → XYZ direction
- Neutral: (0.5, 0.5, 1.0) or RGB (128, 128, 255)
flipNormalTextureGreenChannel
Type: int32_t
Default: 0
Values: 0 (normal), 1 (flipped)
Inverts Y component (green). Used for DirectX/OpenGL conversion.
flipNormalTextureBlueChannel
Type: int32_t
Default: 0
Values: 0 (normal), 1 (flipped)
Inverts Z component (blue). Rarely used.
DirectX vs OpenGL Conventions
| System | Green Channel (Y) |
|---|---|
| DirectX | Y+ down |
| OpenGL | Y+ up |
Set flipNormalTextureGreenChannel = 1 to convert between conventions.