setImageSampler method
- int index,
- Image image, {
- FilterQuality filterQuality = FilterQuality.none,
Sets the sampler uniform at index to image.
The index provided to setImageSampler is the index of the sampler uniform defined in the fragment program, excluding all non-sampler uniforms.
The optional filterQuality argument may be provided to set the quality level used to sample
the image. By default, it is set to FilterQuality.none.
All the sampler uniforms that a shader expects must be provided or the results will be undefined.
Implementation
void setImageSampler(int index, Image image, {FilterQuality filterQuality = FilterQuality.none}) {
assert(!debugDisposed, 'Tried to access uniforms on a disposed Shader: $this');
assert(!image.debugDisposed, 'Image has been disposed');
_setImageSampler(index, image._image, filterQuality.index);
}