Open 3D Engine Atom 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::RPI::ModelLod Class Referencefinal

Inherits Data::InstanceData.

Classes

struct  Mesh
 Mesh data associated with a specific material. More...
 
struct  StreamBufferInfo
 

Public Types

using StreamInfoList = AZStd::fixed_vector< StreamBufferInfo, RHI::Limits::Pipeline::StreamCountMax >
 
using StreamBufferViewList = AZStd::fixed_vector< RHI::StreamBufferView, RHI::Limits::Pipeline::StreamCountMax >
 

Public Member Functions

 AZ_INSTANCE_DATA (ModelLod, "{3C796FC9-2067-4E0F-A660-269F8254D1D5}")
 
 AZ_CLASS_ALLOCATOR (ModelLod, AZ::SystemAllocator)
 
void WaitForUpload ()
 Blocks the CPU until pending buffer uploads have completed.
 
AZStd::span< const MeshGetMeshes () const
 
void CheckOptionalStreams (ShaderOptionGroup &shaderOptions, const ShaderInputContract &contract, size_t meshIndex, const MaterialModelUvOverrideMap &materialModelUvMap={}, const MaterialUvNameMap &materialUvNameMap={}) const
 
bool GetStreamsForMesh (RHI::InputStreamLayout &layoutOut, ModelLod::StreamBufferViewList &streamBufferViewsOut, UvStreamTangentBitmask *uvStreamTangentBitmaskOut, const ShaderInputContract &contract, size_t meshIndex, const MaterialModelUvOverrideMap &materialModelUvMap={}, const MaterialUvNameMap &materialUvNameMap={}) const
 Fills a InputStreamLayout and StreamBufferViewList for the set of streams that satisfy a ShaderInputContract.
 

Static Public Member Functions

static Data::Instance< ModelLodFindOrCreate (const Data::Asset< ModelLodAsset > &lodAsset, const Data::Asset< ModelAsset > &modelAsset)
 

Friends

class ModelSystem
 

Member Function Documentation

◆ CheckOptionalStreams()

void AZ::RPI::ModelLod::CheckOptionalStreams ( ShaderOptionGroup shaderOptions,
const ShaderInputContract contract,
size_t  meshIndex,
const MaterialModelUvOverrideMap &  materialModelUvMap = {},
const MaterialUvNameMap &  materialUvNameMap = {} 
) const

Compares a ShaderInputContract to the mesh's available streams, and if any of them are optional, sets the corresponding "*_isBound" shader option. Call this function to update the ShaderOptionKey before fetching a ShaderVariant, to find a variant that is compatible with this mesh's streams.


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