Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
textures [2020/05/25 12:28] – [Example] admin | textures [2020/05/25 12:31] – [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. |
- | with LTexture | + | LTexture := GorillaLambertMaterialSource.Texture as TGorillaTextureBitmap; |
- | begin | + | |
- | Components | + | // start manipulating properties and update them in GPU. |
- | | + | LTexture.BeginSetup(); |
- | MinFilter := TTextureFilter.Linear; | + | try |
- | MagFilter := TTextureFilter.Linear; | + | |
- | | + | |
- | WrapT := TGorillaTextureWrap.ClampToBorder; | + | |
- | end; | + | finally |
- | finally | + | LTexture.EndSetup(); |
- | LTexture.EndSetup(); | + | end; |
+ | |||
+ | // re-assign texture to update for shader | ||
+ | GorillaLambertMaterialSource.Texture := LTexture; | ||
end; | end; | ||
</ | </ |