Unigine.Decal Class
Inherits from: | Node |
Decal class is used for base decals operation. To create, modify or get information on special types of the decals, use decal-related classes.
Decal Class
Properties
int IntersectionMask#
The current intersection mask of the decal. this mask can be used to cut out areas intersected by the decal from grass, mesh clutter and world clutter
(e.g. to remove grass or forest from the surface of roads projected using decals).
The areas will be cut out only if intersection masks of grass and clutter objects matches this mask (one bit at least).
int ViewportMask#
The current bit mask for rendering into the viewport. the decal is rendered, if its mask matches the camera viewport mask and the viewport mask of the decal's material.
vec4 TexCoord#
The texture coordinates for the decal (a texture atlas can be used).
- The first pair of coordinates (x and y) set texture scale by the X and Y axes. For example, by the scale of 2 the texture is repeated twice on one decal.
- The second pair (z and w) set texture offset along the X and Y axes. For example, by the offset of 0.5 along the X axis the texture is repositioned to the right (so that the edge of the texture is rendered in the center).
float MinVisibleDistance#
The minimum visibility distance, starting at which the decal begins to fade in and then becomes completely visible.
float MinFadeDistance#
The A minimum fade-in distance, across which the decal smoothly becomes visible due to the alpha fading. It is counted starting from the minimum visibility distance value.
float MaxVisibleDistance#
The A maximum visibility distance, starting at which the decal begins to fade out until becomes completely invisible.
float MaxFadeDistance#
The A maximum fade-out distance, across which the decal smoothly becomes invisible due to the alpha fading. It is counted starting from the maximum visibility distance value.
float InitTime#
The A time period of render initialization.
float FadeTime#
The time period during which the decal will fade away (after its life time expires).
float LifeTime#
The time period during which the decal will be projected.
Material Material#
The material used for the decal.
Material MaterialInherit#
The Inherits material for the decal (i.e. creates a material instance). Modifications made in a new material instance will not affect the source material.
A child material will be created only once, all subsequent calls to this method will return the first created child material.
Members
int IsMaterialInherited ( ) #
Returns the value indicating if a given material is inherited (instanced). Modifications made in a material instance do not affect the source material.Return value
1 if the material is inherited successfully; otherwise, 0.int IsTerrainHole ( ) #
Returns a value indicating if the decal is used to create a hole in the terrain.Return value
1 if the decal is used to create a terrain hole; otherwise, 0.int Inside ( vec3 p ) #
Returns a value indicating if the point with the given coordinates is inside the decal (in object-space).Arguments
- vec3 p - Point coordinates.
Return value
1 if the point is inside the decal; otherwise, 0.Last update:
2021-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)