Overview
![]()
Triangle renderers displays the particles as triangles. |
![]() |
Default Materials:
- Default_Triangle: Regular transparent triangle (additive, alpha-blended, or premultiplied-alpha)
- Opaque_Triangle: Opaque triangle, can use alpha-testing for cutouts
Triangle custom normals
If your triangles are lit, you might want to specify custom normals for each vertex of the triangle renderer. By default, the triangle renderer can generate its own normal and tangent.
Here is an effect that reconstructs a mesh using the triangle renderer, showing the result with and without providing per-vertex normals to the renderer.
You can also use the “Normal Bending Factor” that will curve the normals and tangents depending on the barycenter of the triangle.
Triangle custom UVs
You can also specify a per-vertex UV coordinate on the triangle renderer using the “Triangle Custom U V s” feature. The tangent of the triangle will be automatically computed depending on the UVs and normals set as inputs.
The default value for the vertices UVs when the “Triangle Custom U V s” feature is disabled are (0, 0), (1, 0), (0, 1).
Material: Default_Triangle
Property | Type | Description |
Lit | bool | Enables the Lit rendering feature: Lights the particle with the scene lights. |
TriangleCustomNormals | bool | Enables the Triangle Custom Normals rendering feature: Allows to specify a distinct normal for each triangle vertex. When disabled, each vertex will use the normal of the triangle plane. |
TriangleCustomUVs | bool | Enables the Triangle Custom UVs rendering feature: Allows to specify a custom UV coordinate for each triangle vertex. |
NormalBend | bool | Enables the Normal Bend rendering feature: Bends the normals of the triangle to mimic a spherical surface when lighting is enabled. |
Type | enum | Transparent blending mode.
|
SortMode | enum | Allows to specify a custom sorting key.
|
GlobalSortOverride | int | Global sort order of the draw calls. Different values for 2 renderers will break batching and separate their drawcall. Smaller values are drawn first (visually behind higher values). The value can be negative. |
CameraSortOffset | float | Used as a depth bias to allow offseting the draw call bbox along the camera axis (in world units). Different values for 2 renderers will break batching and separate their drawcall. |
+ all common renderer properties | ||
Input pins | ||
Position1 | float3 | Position of the first triangle vertex in world coordinates |
Position2 | float3 | Position of the second triangle vertex in world coordinates |
Position3 | float3 | Position of the third triangle vertex in world coordinates |
DiffuseMap | String | Texture map used for the diffuse lighting component. |
Color | float4 | Diffuse color, multiplied with the diffuse map color. |
SortKey | float | Value to be used for sorting when SortMode is set to ByCustomValue |
Material: Opaque_Triangle
Property | Type | Description |
Lit | bool | Enables the Lit rendering feature: Lights the particle with the scene lights. |
TriangleCustomNormals | bool | Enables the Triangle Custom Normals rendering feature: Allows to specify a distinct normal for each triangle vertex. When disabled, each vertex will use the normal of the triangle plane. |
TriangleCustomUVs | bool | Enables the Triangle Custom UVs rendering feature: Allows to specify a custom UV coordinate for each triangle vertex. |
NormalBend | bool | Enables the Normal Bend rendering feature: Bends the normals of the triangle to mimic a spherical surface when lighting is enabled. |
Type | enum | Opaque mode
|
MaskThreshold | float | Opacity mask threshold value. If the alpha value is below this value, the pixel is discarded. |
+ all common renderer properties | ||
Input pins | ||
Position1 | float3 | Position of the first triangle vertex in world coordinates |
Position2 | float3 | Position of the second triangle vertex in world coordinates |
Position3 | float3 | Position of the third triangle vertex in world coordinates |
DiffuseMap | String | Texture map used for the diffuse lighting component. |
Color | float4 | Diffuse color, multiplied with the diffuse map color. |
Render-features
Lit
Lights the particle with the scene lights.
Property | Type | Description |
CastShadows | bool | Can cast shadows |
Roughness | float | Material roughness (PBR). A roughness of 0.0 represents a mirror, a roughness of 1.0 represents a purely diffuse surface. |
Metalness | float | Material metalness (PBR). A metalness of 0.0 represents a pure nonmetal, a metalness of 1.0 represents a pure metal.Affects the color of the reflections. |
Type | enum |
|
Input pins | ||
NormalMap | String | Texture map representing tangent-space normals to be used for lighting. |
RoughMetalMap | String | Roughness (R) and Metalness (G) packed in an RGBA texture |
LitMaskMap | String |
TriangleCustomNormals
Allows to specify a distinct normal for each triangle vertex. When disabled, each vertex will use the normal of the triangle plane.
Property | Type | Description |
Normal1 | float3 | Normal of the first triangle vertex in world coordinates |
Normal2 | float3 | Normal of the second triangle vertex in world coordinates |
Normal3 | float3 | Normal of the third triangle vertex in world coordinates |
TriangleCustomUVs
Allows to specify a custom UV coordinate for each triangle vertex.
Property | Type | Description |
UV1 | float2 | UV coordinates of the first triangle vertex |
UV2 | float2 | UV coordinates of the second triangle vertex |
UV3 | float2 | UV coordinates of the third triangle vertex |