![]() |
XII Release 0.1.0
|
Renderer-facing packet for both projected deferred decals and mesh decals. More...
#include <DecalComponent.h>
Public Attributes | |
| xiiEnum< xiiDecalProjectionMode > | m_Mode = xiiDecalProjectionMode::Projected |
| Whether this is a projected deferred decal or a mesh decal, used to determine how the decal should be rendered. | |
| xiiDecalResourceHandle | m_hDecal |
| The decal resource containing the textures and properties for this decal, used for rendering. | |
| xiiDecalAtlasResourceHandle | m_hAtlas |
| The decal atlas resource containing the atlas textures and properties for this decal, used for rendering. | |
| xiiHashedString | m_sAtlasId |
| The atlas ID for this decal, used to look up the correct atlas entry in the decal atlas resource for rendering. | |
| xiiTexture2DResourceHandle | m_hAlbedo |
| The albedo texture for this decal, used for rendering. This can either come from the decal resource directly, or from the atlas entry in the decal atlas resource if an atlas is used. | |
| xiiTexture2DResourceHandle | m_hNormal |
| The normal texture for this decal, used for rendering. This can either come from the decal resource directly, or from the atlas entry in the decal atlas resource if an atlas is used. | |
| xiiTexture2DResourceHandle | m_hMaterial |
| The material texture for this decal, used for rendering. This can either come from the decal resource directly, or from the atlas entry in the decal atlas resource if an atlas is used. | |
| xiiTexture2DResourceHandle | m_hEmissive |
| The emissive texture for this decal, used for rendering. This can either come from the decal resource directly, or from the atlas entry in the decal atlas resource if an atlas is used. | |
| xiiMeshResourceHandle | m_hMesh |
| The mesh resource for this decal, used for rendering mesh decals. This is only valid if the projection mode is set to Mesh, and is ignored for projected deferred decals. The mesh resource contains the geometry and materials for the mesh decal, and is used to render the decal as a mesh in the world. | |
| xiiMeshBufferResourceHandle | m_hMeshBuffer |
| The mesh buffer resource for this decal, used for rendering mesh decals. This is only valid if the projection mode is set to Mesh, and is ignored for projected deferred decals. The mesh buffer resource contains the vertex and index buffers for the mesh decal, and is used to render the decal geometry in the world. | |
| xiiVec3 | m_vExtents = xiiVec3(1.0f, 1.0f, 0.25f) |
| The extents of the decal in world space, used for rendering projected deferred decals. This is only valid if the projection mode is set to Projected, and is ignored for mesh decals. The extents define the size of the box used to project the decal onto the scene, with the center of the box being the position of the decal component in the world. | |
| xiiVec2 | m_vUVOffset = xiiVec2::MakeZero() |
| The UV offset for the decal, used for rendering. This is added to the UV coordinates of the decal textures, and can be used to animate the decal or to adjust the placement of the textures on the decal geometry. | |
| xiiVec2 | m_vUVScale = xiiVec2(1.0f) |
| The UV scale for the decal, used for rendering. This is multiplied with the UV coordinates of the decal textures, and can be used to tile the decal textures across the decal geometry or to adjust the placement of the textures on the decal geometry. | |
| xiiVec4 | m_vAtlasUVRect = xiiVec4(0.0f, 0.0f, 1.0f, 1.0f) |
| The UV rectangle for the atlas entry in the decal atlas resource, used for rendering. This is only valid if an atlas is used, and is ignored if no atlas is used. The UV rectangle defines the portion of the atlas textures that should be used for this decal, with (x,y) being the UV coordinates of the top-left corner of the rectangle and (z,w) being the width and height of the rectangle in UV space. | |
| xiiColor | m_Tint = xiiColor::White |
| The tint color for this decal, used for rendering. This is multiplied with the albedo texture of the decal, and can be used to change the color of the decal without modifying the texture itself. | |
| xiiBitflags< xiiDecalChannelMask > | m_ChannelMask |
| The channel mask for this decal, used for rendering. This is used to specify which channels of the decal textures should be used for rendering, and can be used to optimize rendering by only using the necessary channels of the textures. | |
| float | m_fOpacity = 1.0f |
| The opacity of this decal, used for rendering. This is multiplied with the alpha channel of the albedo texture of the decal, and can be used to make the decal more transparent or more opaque without modifying the texture itself. | |
| float | m_fNormalBlend = 1.0f |
| The normal blend factor for this decal, used for rendering. This is used to blend the normal map of the decal with the underlying surface normals, and can be used to adjust the strength of the normal map effect of the decal. | |
| float | m_fRoughness = 0.5f |
| The roughness of this decal, used for rendering. This is used to specify the roughness value for the material of the decal, and can be used to make the decal appear more glossy or more rough without modifying the material texture itself. | |
| float | m_fMetallic = 0.0f |
| The metallic of this decal, used for rendering. This is used to specify the metallic value for the material of the decal, and can be used to make the decal appear more metallic or more non-metallic without modifying the material texture itself. | |
| float | m_fEmissive = 0.0f |
| The emissive intensity of this decal, used for rendering. This is multiplied with the emissive texture of the decal, and can be used to make the decal appear more emissive or less emissive without modifying the texture itself. | |
| float | m_fFadeAngle = 1.0f |
| The fade angle for this decal, used for rendering. This is used to specify the angle at which the decal should start to fade out when viewed from a grazing angle, and can be used to reduce the visibility of the decal when viewed from sharp angles to improve visual quality and reduce artifacts. | |
| xiiUInt8 | m_uiPriority = 128U |
| The priority of this decal, used for rendering. This is used to determine the rendering order of decals when multiple decals overlap, with higher priority decals being rendered on top of lower priority decals. The priority can be used to ensure that important decals are always visible, while less important decals can be faded out or occluded by higher priority decals. | |
| xiiUInt32 | m_uiUniqueID = 0U |
| The unique ID for this decal, used for rendering. This is usually generated from the component ID of the decal component and is used to identify the decal in the renderer, e.g. for sorting or for applying per-decal shader properties. | |
| xiiUInt32 | m_uiFirstPrimitive = 0U |
| The index of the first primitive for this decal in the mesh buffer, used for rendering. This is only valid for mesh decals, and is ignored for projected deferred decals. The first primitive index is used to determine where in the mesh buffer the geometry for this decal starts, and is used together with the primitive count to render the correct portion of the mesh buffer for this decal. | |
| xiiUInt32 | m_uiPrimitiveCount = 0U |
| The number of primitives for this decal in the mesh buffer, used for rendering. This is only valid for mesh decals, and is ignored for projected deferred decals. The primitive count is used to determine how many primitives in the mesh buffer belong to this decal, and is used together with the first primitive index to render the correct portion of the mesh buffer for this decal. | |
| xiiUInt32 | m_uiFirstMeshlet = 0U |
| The index of the first meshlet for this decal in the mesh buffer, used for rendering. This is only valid for mesh decals, and is ignored for projected deferred decals. The first meshlet index is used to determine where in the mesh buffer the meshlets for this decal start, and is used together with the meshlet count to render the correct portion of the mesh buffer for this decal when using meshlet-based rendering. | |
| xiiUInt32 | m_uiMeshletCount = 0U |
| The number of meshlets for this decal in the mesh buffer, used for rendering. This is only valid for mesh decals, and is ignored for projected deferred decals. The meshlet count is used to determine how many meshlets in the mesh buffer belong to this decal, and is used together with the first meshlet index to render the correct portion of the mesh buffer for this decal when using meshlet-based rendering. | |
| Public Attributes inherited from xiiRenderData | |
| xiiTransform | m_GlobalTransform = xiiTransform::MakeIdentity() |
| xiiBoundingBoxSphere | m_GlobalBounds = xiiBoundingBoxSphere::MakeZero() |
| xiiGameObjectHandle | m_hOwnerObject |
| xiiComponentHandle | m_hOwnerComponent |
| xiiUInt64 | m_uiSortingKey = 0 |
Additional Inherited Members | |
| Public Member Functions inherited from xiiReflectedClass | |
| virtual const xiiRTTI * | GetDynamicRTTI () const |
| bool | IsInstanceOf (const xiiRTTI *pType) const |
| Returns whether the type of this instance is of the given type or derived from it. | |
| template<typename T> | |
| XII_ALWAYS_INLINE bool | IsInstanceOf () const |
| Returns whether the type of this instance is of the given type or derived from it. | |
| Static Public Member Functions inherited from xiiNoBase | |
| static const xiiRTTI * | GetStaticRTTI () |
Renderer-facing packet for both projected deferred decals and mesh decals.