#import <ARTextureMaterial.h>
Inherits ARMaterial.
An ARTextureMaterial is a material for shading a texture. This is commonly used with 3D models that do not require dynamic lighting. This type of material is functionally the same as setting the colour property of an ARLightMaterial with a texture.
◆ initWithTexture:
- (instancetype) initWithTexture: |
|
(ARTexture *) |
texture |
|
Initialise with an existing ARTexture.
Example of use:
- Parameters
-
texture | The texture to initialise with. |
- Returns
- The material, initialised with the texture.
◆ materialwithTexture:
+ (instancetype) materialwithTexture: |
|
(ARTexture *) |
texture |
|
Class method to create an instance of an ARTextureMaterial using an ARTexture.
Example of use:
- Parameters
-
texture | The texture to initialise with. |
- Returns
- The initialised material.
◆ alpha
The alpha factor. Combine with the texture sample to alter transparency. Range is 0..1, where 0 is fully transparent and 1 is fully opaque. Default value is 1.
◆ blendParameter
The blend parameter. Mixes blendTexture with texture based on value. Range is 0..1, where 0 is only the main texture and 1 is only the blend texture. Default value is 0.
◆ blendTexture
The blend texture is a secondary texture with an inverted alpha value. It blends with the colour texture based on the blend parameter. The level of transparency for both the main and blend textures depends on the blend parameter. If the blend parameter is 0, the renderer will draw only the main texture. If the blend parameter is 1, the renderer will draw only the blend texture. Anything in between displays both textures at varying degrees of transparency.
◆ texture
The main texture displayed on the material.
The documentation for this class was generated from the following files:
- ARTextureMaterial.h
- ARTextureMaterial.m