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:31] – [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> | ||
Line 91: | Line 91: | ||
begin | begin | ||
// request the texture and convert to Gorilla3D texture bitmap. | // request the texture and convert to Gorilla3D texture bitmap. | ||
- | LTexture := GorillaLambertMaterialSource.Texture as TGorillaTextureBitmap; | + | LTexture := GorillaLambertMaterialSource1.Texture as TGorillaTextureBitmap; |
| | ||
// start manipulating properties and update them in GPU. | // start manipulating properties and update them in GPU. | ||
LTexture.BeginSetup(); | LTexture.BeginSetup(); | ||
try | try | ||
- | | + | |
- | LTexture.MagFilter := TTextureFilter.Nearest; | + | LTexture.MagFilter := TTextureFilter.Nearest; |
- | LTexture.Style := LTexture.Style - [TTextureStyle.MipMaps]; | + | LTexture.Style := LTexture.Style - [TTextureStyle.MipMaps]; |
finally | finally | ||
- | | + | |
end; | end; | ||
| | ||
// re-assign texture to update for shader | // re-assign texture to update for shader | ||
- | | + | |
end; | end; | ||
</ | </ |