filtering property

Get or set the filtering used for this RenderTexture.

The default is RenderTextureFiltering.LINEAR which is fine for most use cases. In games with 2D pixel art it is sometimes better to use the RenderTextureFiltering.NEAREST filtering.


RenderTextureFiltering get filtering => _filtering;
void filtering=(RenderTextureFiltering filtering)


set filtering(RenderTextureFiltering filtering) {
  if (_filtering == filtering) return;
  _filtering = filtering;

  if (_renderContext == null || _texture == null) return;
  if (_renderContext!.contextIdentifier != contextIdentifier) return;

      gl.WebGL.TEXTURE_2D, gl.WebGL.TEXTURE_MIN_FILTER, _filtering.value);
      gl.WebGL.TEXTURE_2D, gl.WebGL.TEXTURE_MAG_FILTER, _filtering.value);