fragmentShaderForLighting method
Selects this material's fragment shader for the frame lighting state.
The radiance-layout variant wins over the shadow one: a shadow variant in the wrong layout would be handed a texture its sampler cannot read, while dropping the no-shadow variant only costs dead shadow code.
While a surface debug view may show (Lighting.surfaceDebugViews), a
shader from baseShaderLibrary gives way to its twin built with the
views, when the bundle has one.
Implementation
@override
gpu.Shader fragmentShaderForLighting(Lighting lighting) {
_ensurePreparedVariant();
return _preparedVariant?.fragmentShaderForLighting(lighting) ??
super.fragmentShaderForLighting(lighting);
}