run method
Returns linear RGBA for attachment zero. Null discards the fragment.
Implementation
@override
Vector4? run(Float32List v, ShaderBindings bindings, FragmentContext c) {
final s = readSurface(v, bindings, c);
// Discarded under a mask cutoff, exactly as every other model here is: a
// silhouette must have the holes the thing it stands for has.
if (s == null) return null;
// `WriteSurface`'s weight too: the GLSL calls it, so a blended material
// on this model is premultiplied there and has to be here.
final weight = premultiplies(bindings) ? s.alpha : 1.0;
final fogged = applyFog(s.albedo, v, bindings);
return Vector4(
fogged.x * weight,
fogged.y * weight,
fogged.z * weight,
s.alpha,
);
}