GPUSamplerDescriptor.comparison constructor
A shadow-map sampler, which is a different kind of object here.
compare is absent or it is a comparison sampler, and there is no third
state. Writing compare: null is the same TypeError that
GPUColorTargetState documents — an absent dictionary member and an
explicit null are different things — and a comparison sampler can only be
bound to a sampler_comparison binding, so the two are not
interchangeable at the call site either. Two constructors, so the choice
is made where the shadow map is set up rather than discovered in a
browser.
Implementation
external factory GPUSamplerDescriptor.comparison({
String addressModeU,
String addressModeV,
String addressModeW,
String magFilter,
String minFilter,
String mipmapFilter,
String compare,
String label,
});