NORMAFORGE SHADER MANUAL

Normal Map Technical Specifications & GPU Compression Guide

Deep technical reference on tangent-space normal maps: Sobel vs Scharr kernels, BC5 two-channel GPU compression, sRGB errors, and Z reconstruction.

Kernel Weight Comparison

Filter Kernel Horizontal Mask (Gx) Rotational Isotropy Best Material Class
3×3 Sobel [-1, 0, +1; -2, 0, +2; -1, 0, +1] Moderate (~4° diagonal error) Crisp pixel edges, retro/stylized assets
3×3 Scharr [-3, 0, +3; -10, 0, +10; -3, 0, +3] High (<0.2° angular error) Hard-surface bevels, bolts, stone, metal
5×5 Smooth Wide multi-ring stencil Smooth broad slopes Organic terrain, plaster, cloth folds

How Game Engines Compress Normal Maps (BC5 / DXT5nm)

When Unreal Engine or Unity imports your PNG normal map, the engine does not keep standard RGB JPEG-like compression (which smears subtle normal vectors into blocky artifacts). Instead, modern engines discard the Blue (Z) channel, compress only Red (X) and Green (Y) at high precision using BC5 / RGTC2 (two independent 8-bit channels), and reconstruct Z inside the pixel shader on the fly:

Nz = sqrt(max(0.0, 1.0 - Nx*Nx - Ny*Ny))

Because the GPU assumes unit-length vectors (Nx² + Ny² + Nz² = 1), every pixel NormaForge outputs is strictly Euclidean-normalized before 8-bit quantization.

Seamless Wrap Guarantee

When Seamless Edge Wrap is enabled, NormaForge computes convolution gradients across toroidal boundaries so border normal vectors match their opposite edges to the exact bit—eliminating lighting seams across tiled game walls.

Compare browser vs desktop baking pipelines on Baker Comparison or try the OpenGL vs DirectX Tool.

Turn Real-World Photos Directly Into Full 3D Meshes

Generate navigable 3D Gaussian Splats and textured geometry on TripoSplat.com.

Turn Photos into Full 3D Gaussian Splats & Meshes on TripoSplat.com