Open 3D Engine Meshlets Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Meshlets::MeshletsRenderObject Class Reference

#include <MeshletsRenderObject.h>

Public Member Functions

 MeshletsRenderObject (Data::Asset< RPI::ModelAsset > sourceModelAsset, MeshletsFeatureProcessor *meshletsFeatureProcessor)
 
AZStd::string & GetName ()
 
ModelLodDataArray & GetMeshletsRenderData (uint32_t lodIdx=0)
 
uint32_t GetMeshletsCount ()
 

Static Public Member Functions

static Data::Instance< RPI::ShaderResourceGroup > CreateShaderResourceGroup (Data::Instance< RPI::Shader > shader, const char *shaderResourceGroupId, const char *moduleName)
 
static bool CreateAndBindComputeSrgAndDispatch (Data::Instance< RPI::Shader > computeShader, MeshRenderData &meshRenderData)
 
static void PrepareRenderSrgDescriptors (MeshRenderData &meshRenderData, uint32_t vertexCount, uint32_t indicesCount)
 

Public Attributes

Name s_textureCoordinatesName
 
Name s_indicesName
 

Static Public Attributes

static uint32_t s_modelNumber
 

Protected Member Functions

bool ProcessBuffersData (float *position, uint32_t vtxNum)
 
uint8_t * RetrieveBufferData (const RPI::BufferAssetView *bufferView, RHI::Format &format, uint32_t expectedAmount, uint32_t &existingAmount, RHI::BufferViewDescriptor &bufferDesc)
 
bool RetrieveSourceMeshData (const RPI::ModelLodAsset::Mesh &meshAsset, MeshRenderData &meshRenderData, uint32_t vertexCount, uint32_t indexCount)
 
uint32_t CreateMeshlets (GeneratorMesh &mesh)
 
uint32_t CreateMeshlets (float *positions, float *normals, float *texCoords, uint32_t vtxNum, uint16_t *indices, uint32_t idxNum, RHI::Format IndexStreamFormat)
 
uint32_t CreateMeshletsFromModelAsset (Data::Asset< RPI::ModelAsset > sourceModelAsset)
 
uint32_t CreateMeshletsRenderObject (const RPI::ModelLodAsset::Mesh &meshAsset, MeshRenderData &meshRenderData)
 
bool BuildDrawPacket (RHI::DrawPacketBuilder::DrawRequest &drawRequest, MeshRenderData &meshRenderData)
 
bool CreateAndBindRenderBuffers (MeshRenderData &meshRenderData)
 
void PrepareComputeSrgDescriptors (MeshRenderData &meshRenderData, uint32_t vertexCount, uint32_t indexCount)
 
bool CreateComputeBuffers (MeshRenderData &meshRenderData)
 
bool SetShaders ()
 

Detailed Description

Currently assuming single model without Lods so that the handling of the meshlet creation and handling of the array is easier. If several meshes or Lods exist, they will be created as separate models and the last model's instance will be kept in this class. To enhance this, add inheritance to lower levels of the model / mesh. MeshletsModel represents a combined model that can contain an array of ModelLods. Each one of the ModelLods contains a vector of meshes, representing possible multiple element within the mesh.


The documentation for this class was generated from the following file: