shine world - 2020-04-17

Hi all,
In the past I've added a background image feature to scene using a TGLHudSprite with material texture:

  procedure UpdateBackgroundImage;
  var
    Hash: Cardinal;
  begin
    try
      if not FileExists(FBackgroundImageFileName) then Abort;
      if not SFHashFromFile(FBackgroundImageFileName, Hash) then Abort;
      if FBackgroundImageHash <> Hash then
      begin
        FBackgroundImageHash := Hash;
        SceneBackground.Material.Texture.Image.LoadFromFile(FBackgroundImageFileName);
        with (SceneBackground.Material.Texture.Image as TGLPictureImage).Picture do
        begin
          SceneBackground.SetSize(Width, Height);
          SceneBackground.Position.X := Width / 2;
          SceneBackground.Position.Y := Height / 2;
        end;
      end;
      SceneBackground.Visible := True;
    except
      SceneBackground.Visible := False;
    end;
  end;

This worked fine with common gradient colored PNG background files.
Now I would like to add some image in background and the result is always a blurried result (invisible in gradient colors background).

PNG shoud be showed not scaled (ratio 1:1) in planar video surface.
I've tried to change some properties and at moment that is what I use to get the better result:

    object SceneBackground: TGLHUDSprite
      Material.Texture.MagFilter = maNearest
      Material.Texture.MinFilter = miNearest
      Material.Texture.TextureWrap = twNone
      Material.Texture.Disabled = False
      Width = 16.000000000000000000
      Height = 16.000000000000000000
      NoZWrite = False
      MirrorU = False
      MirrorV = False
    end

There is some other setting to get sharp image ?
Thank you in advace.

 

Last edit: shine world 2020-04-17