Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
textures [2020/05/25 12:28] – [Example] admin | textures [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 | + | We have to disable interpolation |
<file pascal> | <file pascal> | ||
- | LTexture := TGorillaTextureBitmap.Create(1024, | + | var LTexture : TGorillaTextureBitmap; |
- | LTexture.BeginSetup(); | + | begin |
- | try | + | // request the texture and convert to Gorilla3D texture bitmap. |
- | | + | |
- | begin | + | |
- | Components := TPixelFormatEx.RGB32F; | + | // start manipulating properties and update them in GPU. |
- | Format := TPixelFormatEx.RGB; | + | |
- | | + | try |
- | MagFilter := TTextureFilter.Linear; | + | LTexture.MinFilter := TTextureFilter.Nearest; |
- | WrapS := TGorillaTextureWrap.ClampToBorder; | + | |
- | WrapT := TGorillaTextureWrap.ClampToBorder; | + | |
- | end; | + | finally |
- | finally | + | |
LTexture.EndSetup(); | LTexture.EndSetup(); | ||
+ | end; | ||
+ | | ||
+ | // re-assign texture to update for shader | ||
+ | GorillaLambertMaterialSource1.Texture := LTexture; | ||
end; | end; | ||
</ | </ |