Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
textures [2020/05/25 12:28] – [Example] admintextures [2020/05/25 12:32] – [Example] admin
Line 85: Line 85:
 Secondly a common example to ignore linear interpolation of a material texture. This becomes very useful, when displaying textures in pixelart, like minecraft. Secondly a common example to ignore linear interpolation of a material texture. This becomes very useful, when displaying textures in pixelart, like minecraft.
  
-We have to disable interpolation an mipmapping.+We have to disable interpolation and mipmapping.
  
 <file pascal> <file pascal>
-LTexture := TGorillaTextureBitmap.Create(1024, 1024)+var LTexture : TGorillaTextureBitmap; 
-LTexture.BeginSetup(); +begin 
-try +  // request the texture and convert to Gorilla3D texture bitmap. 
-    with LTexture do +  LTexture := GorillaLambertMaterialSource1.Texture as TGorillaTextureBitmap
-    begin +   
-        Components := TPixelFormatEx.RGB32F; +  // start manipulating properties and update them in GPU. 
-        Format := TPixelFormatEx.RGB; +  LTexture.BeginSetup(); 
-        MinFilter := TTextureFilter.Linear+  try 
-        MagFilter := TTextureFilter.Linear+    LTexture.MinFilter := TTextureFilter.Nearest
-        WrapS := TGorillaTextureWrap.ClampToBorder; +    LTexture.MagFilter := TTextureFilter.Nearest
-        WrapT := TGorillaTextureWrap.ClampToBorder; +    LTexture.Style := LTexture.Style - [TTextureStyle.MipMaps]
-    end+  finally
-finally+
     LTexture.EndSetup();     LTexture.EndSetup();
 +  end;
 +  
 +  // re-assign texture to update for shader
 +  GorillaLambertMaterialSource1.Texture := LTexture;
 end; end;
 </file> </file>