Clamp a gamma value to a safe range and supply the canonical
default of 1.0 when undefined.
The shader computes pow(color, 1.0 / gamma), which divides by
zero when gamma == 0. A lower bound of 0.001 matches what each
material constructor was clamping inline before this helper
existed; using one helper across all eight files (Point/Line/
GSplat/Mesh × GLSL/TSL) keeps the clamp identical if the bound
ever changes.
Clamp a gamma value to a safe range and supply the canonical default of
1.0when undefined.The shader computes
pow(color, 1.0 / gamma), which divides by zero whengamma == 0. A lower bound of0.001matches what each material constructor was clamping inline before this helper existed; using one helper across all eight files (Point/Line/ GSplat/Mesh × GLSL/TSL) keeps the clamp identical if the bound ever changes.