3
0

SkinnedMeshFeatureProcessor.cpp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Atom/Feature/SkinnedMesh/SkinnedMeshFeatureProcessorBus.h>
  9. #include <Atom/Feature/SkinnedMesh/SkinnedMeshStatsBus.h>
  10. #include <Atom/Feature/Mesh/MeshFeatureProcessor.h>
  11. #include <SkinnedMesh/SkinnedMeshFeatureProcessor.h>
  12. #include <SkinnedMesh/SkinnedMeshRenderProxy.h>
  13. #include <SkinnedMesh/SkinnedMeshComputePass.h>
  14. #include <MorphTargets/MorphTargetComputePass.h>
  15. #include <MorphTargets/MorphTargetDispatchItem.h>
  16. #include <Atom/RPI.Public/Model/ModelLodUtils.h>
  17. #include <Atom/RPI.Public/Pass/PassFilter.h>
  18. #include <Atom/RPI.Public/Pass/PassSystemInterface.h>
  19. #include <Atom/RPI.Public/RPIUtils.h>
  20. #include <Atom/RPI.Public/Shader/Shader.h>
  21. #include <Atom/RPI.Public/RenderPipeline.h>
  22. #include <Atom/RHI/CommandList.h>
  23. #include <AzCore/Jobs/JobCompletion.h>
  24. #include <AzCore/Jobs/JobFunction.h>
  25. #include <AzCore/RTTI/TypeInfo.h>
  26. #include <AzCore/Serialization/SerializeContext.h>
  27. namespace AZ
  28. {
  29. namespace Render
  30. {
  31. const char* SkinnedMeshFeatureProcessor::s_featureProcessorName = "SkinnedMeshFeatureProcessor";
  32. void SkinnedMeshFeatureProcessor::Reflect(ReflectContext* context)
  33. {
  34. if (auto* serializeContext = azrtti_cast<SerializeContext*>(context))
  35. {
  36. serializeContext
  37. ->Class<SkinnedMeshFeatureProcessor, FeatureProcessor>()
  38. ->Version(0);
  39. }
  40. }
  41. void SkinnedMeshFeatureProcessor::Activate()
  42. {
  43. m_statsCollector = AZStd::make_unique<SkinnedMeshStatsCollector>(this);
  44. EnableSceneNotification();
  45. }
  46. void SkinnedMeshFeatureProcessor::Deactivate()
  47. {
  48. DisableSceneNotification();
  49. m_statsCollector = nullptr;
  50. AZ_Warning("SkinnedMeshFeatureProcessor", m_renderProxies.size() == 0,
  51. "Deactivaing the SkinnedMeshFeatureProcessor, but there are still outstanding render proxy handles. Components\n"
  52. "using SkinnedMeshRenderProxy handles should free them before the SkinnedMeshFeatureProcessor is deactivated.\n"
  53. );
  54. }
  55. void SkinnedMeshFeatureProcessor::Render(const FeatureProcessor::RenderPacket& packet)
  56. {
  57. AZ_PROFILE_SCOPE(AzRender, "SkinnedMeshFeatureProcessor: Render");
  58. #if 0 //[GFX_TODO][ATOM-13564] Temporarily disable skinning culling until we figure out how to hook up visibility & lod selection with skinning:
  59. //Setup the culling workgroup (it will be re-used for each view)
  60. {
  61. AZ_PROFILE_SCOPE(AzRender, "set up skinned culling workgroup");
  62. azsnprintf(m_workgroup.m_name, AZ_ARRAY_SIZE(m_workgroup.m_name), "SkinnedMeshFP workgroup");
  63. m_workgroup.m_drawListMask.reset();
  64. m_workgroup.m_cullPackets.clear();
  65. m_lodPackets.clear();
  66. m_potentiallyVisibleProxies.clear();
  67. for (SkinnedMeshRenderProxy& renderProxy : m_renderProxies)
  68. {
  69. renderProxy.m_isQueuedForCompile = false;
  70. if (renderProxy.m_inputBuffers->GetModel()->IsUploadPending())
  71. {
  72. renderProxy.m_inputBuffers->GetModel()->WaitForUpload();
  73. }
  74. if (renderProxy.m_instance->m_model->IsUploadPending())
  75. {
  76. renderProxy.m_instance->m_model->WaitForUpload();
  77. }
  78. //Note: we are creating pointers to the modelDataInstance cullpacket and lod packet here,
  79. //and holding them until the skinnedMeshDispatchItems are dispatched. There is an assumption that the underlying
  80. //data will not move during this phase.
  81. ModelDataInstance& modelDataInstance = **renderProxy.m_meshHandle;
  82. m_workgroup.m_cullPackets.push_back(&modelDataInstance.GetCullPacket());
  83. m_workgroup.m_drawListMask |= modelDataInstance.GetCullPacket().m_drawListMask;
  84. m_lodPackets.push_back(&modelDataInstance.GetLodPacket());
  85. m_potentiallyVisibleProxies.push_back(&renderProxy);
  86. }
  87. }
  88. if (m_workgroup.m_cullPackets.size() > 0)
  89. {
  90. RPI::CullingSystem* cullingSystem = packet.m_cullingSystem;
  91. Job* currentJob = JobContext::GetGlobalContext()->GetJobManager().GetCurrentJob();
  92. //Dispatch the workgroup to each view
  93. for (const RPI::ViewPtr& viewPtr : packet.m_views)
  94. {
  95. Job* processWorkgroupJob = AZ::CreateJobFunction(
  96. [this, cullingSystem, viewPtr](AZ::Job& thisJob)
  97. {
  98. AZ_PROFILE_SCOPE(AzRender, "skinningMeshFP processWorkgroupJob - View: %s", viewPtr->GetName().GetCStr());
  99. auto dispatchSkinningComputeProgramsCallback = [this](AZStd::shared_ptr<RPI::CullingBatchResults> results) -> void
  100. {
  101. AZ_PROFILE_SCOPE(AzRender, "dispatchSkinningComputePrograms");
  102. //the [1][1] element of a projection matrix stores cot(FovY/2) (equal to 2*nearPlaneDistance/nearPlaneHeight),
  103. //which is used to determine the (vertical) projected size in screen space
  104. const float yScale = results->m_viewPtr->GetViewToClipMatrix().GetRow(1).GetY();
  105. const Vector3 cameraPos = results->m_viewPtr->GetViewToWorldMatrix().GetTranslation();
  106. const bool isPerspective = (results->m_viewPtr->GetViewToClipMatrix().GetElement(3, 3) == 0.f);
  107. for (size_t v = 0, numVisibleItems = results->m_visibleItems.size(); v < numVisibleItems; ++v)
  108. {
  109. uint8_t relativeIndex = results->m_visibleItems[v];
  110. uint32_t itemIndex = results->m_rangeFirst + relativeIndex;
  111. const RPI::LodPacket* lodPacket = m_lodPackets[itemIndex];
  112. Vector3 pos = m_workgroup.m_cullPackets[itemIndex]->m_boundingSphere.GetCenter();
  113. SkinnedMeshRenderProxy* renderProxy = m_potentiallyVisibleProxies[itemIndex];
  114. const float approxScreenPercentage = RPI::ModelLodUtils::ApproxScreenPercentage(
  115. pos, lodPacket->m_lodSelectionRadius, cameraPos, yScale, isPerspective);
  116. for (size_t lodIndex = 0, numLods = lodPacket->m_lods.size(); lodIndex < numLods; ++lodIndex)
  117. {
  118. const RPI::LodPacket::Lod& lod = lodPacket->m_lods[lodIndex];
  119. //Note that this supports overlapping lod ranges (to support cross-fading lods, for example)
  120. float minScreenPercentage(lod.m_range.m_min);
  121. float maxScreenPercentage(lod.m_range.m_max);
  122. if (approxScreenPercentage >= minScreenPercentage && approxScreenPercentage <= maxScreenPercentage)
  123. {
  124. AZStd::lock_guard lock(m_dispatchItemMutex);
  125. for (const AZStd::unique_ptr<SkinnedMeshDispatchItem>& skinnedMeshDispatchItem : renderProxy.m_dispatchItemsByLod[lodIndex])
  126. {
  127. // Add one skinning dispatch item for each mesh in the lod
  128. if (skinnedMeshDispatchItem->IsEnabled())
  129. {
  130. m_skinningDispatches.insert(skinnedMeshDispatchItem->GetRHIDispatchItem());
  131. }
  132. }
  133. for (size_t morphTargetIndex = 0; morphTargetIndex < renderProxy->m_morphTargetDispatchItemsByLod[lodIndex].size(); morphTargetIndex++)
  134. {
  135. const MorphTargetDispatchItem* dispatchItem = renderProxy->m_morphTargetDispatchItemsByLod[lodIndex][morphTargetIndex].get();
  136. if (dispatchItem && dispatchItem->GetWeight() > AZ::Constants::FloatEpsilon)
  137. {
  138. m_morphTargetDispatches.insert(&dispatchItem->GetRHIDispatchItem());
  139. }
  140. }
  141. }
  142. }
  143. }
  144. };
  145. cullingSystem->DispatchCullingWorkgroup(viewPtr, m_workgroup, &thisJob, dispatchSkinningComputeProgramsCallback);
  146. },
  147. true, nullptr); //auto-deletes
  148. currentJob->SetContinuation(processWorkgroupJob);
  149. processWorkgroupJob->Start();
  150. }
  151. }
  152. #else //[GFX_TODO][ATOM-13564] This is a temporary implementation that submits all of the skinning compute shaders without any culling:
  153. for (SkinnedMeshRenderProxy& renderProxy : m_renderProxies)
  154. {
  155. if (renderProxy.m_inputBuffers->GetModel()->IsUploadPending())
  156. {
  157. renderProxy.m_inputBuffers->GetModel()->WaitForUpload();
  158. }
  159. if (renderProxy.m_instance->m_model->IsUploadPending())
  160. {
  161. renderProxy.m_instance->m_model->WaitForUpload();
  162. }
  163. ModelDataInstance& modelDataInstance = **renderProxy.m_meshHandle;
  164. const RPI::Cullable& cullable = modelDataInstance.GetCullable();
  165. for (const RPI::ViewPtr& viewPtr : packet.m_views)
  166. {
  167. RPI::View* view = viewPtr.get();
  168. const Matrix4x4& viewToClip = view->GetViewToClipMatrix();
  169. //[GFX_TODO][ATOM-13564]:
  170. // Option 1)
  171. // store the lastVisibleFrameIndex and lowestLodIndex (or a bitfield of the visible lods) on the Cullable,
  172. // ** run this code *after* culling is done **, use the cached info to decide what to dispatch here
  173. // Option 2)
  174. // add a separate visibility entry for each skinned object to the IVisibilitySystem (with a different type flag),
  175. // ensure the entries are kept in sync with the corresponding mesh entry
  176. // do the enumeration for each view, keep track of the lowest lod for each entry,
  177. // and submit the appropriate dispatch item
  178. switch (cullable.m_lodData.m_lodConfiguration.m_lodType)
  179. {
  180. case RPI::Cullable::LodType::SpecificLod:
  181. {
  182. AZStd::lock_guard lock(m_dispatchItemMutex);
  183. auto lodIndex = cullable.m_lodData.m_lodConfiguration.m_lodOverride;
  184. for (const AZStd::unique_ptr<SkinnedMeshDispatchItem>& skinnedMeshDispatchItem : renderProxy.m_dispatchItemsByLod[lodIndex])
  185. {
  186. // Add one skinning dispatch item for each mesh in the lod
  187. if (skinnedMeshDispatchItem->IsEnabled())
  188. {
  189. m_skinningDispatches.insert(&skinnedMeshDispatchItem->GetRHIDispatchItem());
  190. }
  191. }
  192. for (size_t morphTargetIndex = 0; morphTargetIndex < renderProxy.m_morphTargetDispatchItemsByLod[lodIndex].size(); morphTargetIndex++)
  193. {
  194. const MorphTargetDispatchItem* dispatchItem = renderProxy.m_morphTargetDispatchItemsByLod[lodIndex][morphTargetIndex].get();
  195. if (dispatchItem && dispatchItem->GetWeight() > AZ::Constants::FloatEpsilon)
  196. {
  197. m_morphTargetDispatches.insert(&dispatchItem->GetRHIDispatchItem());
  198. }
  199. }
  200. }
  201. break;
  202. case RPI::Cullable::LodType::ScreenCoverage:
  203. default:
  204. //the [1][1] element of a perspective projection matrix stores cot(FovY/2) (equal to 2*nearPlaneDistance/nearPlaneHeight),
  205. //which is used to determine the (vertical) projected size in screen space
  206. const float yScale = viewToClip.GetElement(1, 1);
  207. const bool isPerspective = viewToClip.GetElement(3, 3) == 0.f;
  208. const Vector3 cameraPos = view->GetViewToWorldMatrix().GetTranslation();
  209. const Vector3 pos = cullable.m_cullData.m_boundingSphere.GetCenter();
  210. const float approxScreenPercentage = RPI::ModelLodUtils::ApproxScreenPercentage(
  211. pos, cullable.m_lodData.m_lodSelectionRadius, cameraPos, yScale, isPerspective);
  212. for (size_t lodIndex = 0; lodIndex < cullable.m_lodData.m_lods.size(); ++lodIndex)
  213. {
  214. const RPI::Cullable::LodData::Lod& lod = cullable.m_lodData.m_lods[lodIndex];
  215. //Note that this supports overlapping lod ranges (to support cross-fading lods, for example)
  216. if (approxScreenPercentage >= lod.m_screenCoverageMin && approxScreenPercentage <= lod.m_screenCoverageMax)
  217. {
  218. AZStd::lock_guard lock(m_dispatchItemMutex);
  219. for (const AZStd::unique_ptr<SkinnedMeshDispatchItem>& skinnedMeshDispatchItem : renderProxy.m_dispatchItemsByLod[lodIndex])
  220. {
  221. // Add one skinning dispatch item for each mesh in the lod
  222. if (skinnedMeshDispatchItem->IsEnabled())
  223. {
  224. m_skinningDispatches.insert(&skinnedMeshDispatchItem->GetRHIDispatchItem());
  225. }
  226. }
  227. for (size_t morphTargetIndex = 0; morphTargetIndex < renderProxy.m_morphTargetDispatchItemsByLod[lodIndex].size(); morphTargetIndex++)
  228. {
  229. const MorphTargetDispatchItem* dispatchItem = renderProxy.m_morphTargetDispatchItemsByLod[lodIndex][morphTargetIndex].get();
  230. if (dispatchItem && dispatchItem->GetWeight() > AZ::Constants::FloatEpsilon)
  231. {
  232. m_morphTargetDispatches.insert(&dispatchItem->GetRHIDispatchItem());
  233. }
  234. }
  235. }
  236. }
  237. break;
  238. }
  239. }
  240. }
  241. #endif
  242. }
  243. void SkinnedMeshFeatureProcessor::OnRenderPipelineChanged(RPI::RenderPipeline* renderPipeline,
  244. RPI::SceneNotification::RenderPipelineChangeType changeType)
  245. {
  246. if (changeType == RPI::SceneNotification::RenderPipelineChangeType::Added
  247. || changeType == RPI::SceneNotification::RenderPipelineChangeType::PassChanged)
  248. {
  249. InitSkinningAndMorphPass(renderPipeline);
  250. }
  251. }
  252. void SkinnedMeshFeatureProcessor::OnBeginPrepareRender()
  253. {
  254. m_renderProxiesChecker.soft_lock();
  255. SkinnedMeshFeatureProcessorNotificationBus::Broadcast(&SkinnedMeshFeatureProcessorNotificationBus::Events::OnUpdateSkinningMatrices);
  256. }
  257. void SkinnedMeshFeatureProcessor::OnRenderEnd()
  258. {
  259. m_renderProxiesChecker.soft_unlock();
  260. // Clear any dispatch items that were added but never submitted
  261. // in case there were no passes that submitted this frame
  262. // because they execute at a lower frequency
  263. m_skinningDispatches.clear();
  264. m_morphTargetDispatches.clear();
  265. m_alreadyCreatedSkinningScopeThisFrame = false;
  266. m_alreadyCreatedMorphTargetScopeThisFrame = false;
  267. }
  268. SkinnedMeshFeatureProcessor::SkinnedMeshHandle SkinnedMeshFeatureProcessor::AcquireSkinnedMesh(const SkinnedMeshHandleDescriptor& desc)
  269. {
  270. // don't need to check the concurrency during emplace() because the StableDynamicArray won't move the other elements during insertion
  271. SkinnedMeshHandle handle = m_renderProxies.emplace(desc);
  272. if (!handle->Init(*GetParentScene(), this))
  273. {
  274. m_renderProxies.erase(handle);
  275. }
  276. return handle;
  277. }
  278. bool SkinnedMeshFeatureProcessor::ReleaseSkinnedMesh(SkinnedMeshHandle& handle)
  279. {
  280. if (handle.IsValid())
  281. {
  282. AZStd::concurrency_check_scope scopeCheck(m_renderProxiesChecker);
  283. m_renderProxies.erase(handle);
  284. return true;
  285. }
  286. return false;
  287. }
  288. void SkinnedMeshFeatureProcessor::SetSkinningMatrices(const SkinnedMeshHandle& handle, const AZStd::vector<float>& data)
  289. {
  290. if (handle.IsValid())
  291. {
  292. handle->SetSkinningMatrices(data);
  293. }
  294. }
  295. void SkinnedMeshFeatureProcessor::SetMorphTargetWeights(
  296. const SkinnedMeshHandle& handle, uint32_t lodIndex, const AZStd::vector<float>& weights)
  297. {
  298. if (handle.IsValid())
  299. {
  300. handle->SetMorphTargetWeights(lodIndex, weights);
  301. }
  302. }
  303. void SkinnedMeshFeatureProcessor::EnableSkinning(const SkinnedMeshHandle& handle, uint32_t lodIndex, uint32_t meshIndex)
  304. {
  305. if (handle.IsValid())
  306. {
  307. handle->EnableSkinning(lodIndex, meshIndex);
  308. }
  309. }
  310. void SkinnedMeshFeatureProcessor::DisableSkinning(const SkinnedMeshHandle& handle, uint32_t lodIndex, uint32_t meshIndex)
  311. {
  312. if (handle.IsValid())
  313. {
  314. handle->DisableSkinning(lodIndex, meshIndex);
  315. }
  316. }
  317. void SkinnedMeshFeatureProcessor::InitSkinningAndMorphPass(RPI::RenderPipeline* renderPipeline)
  318. {
  319. RPI::PassFilter skinPassFilter = RPI::PassFilter::CreateWithPassName(AZ::Name{ "SkinningPass" }, renderPipeline);
  320. RPI::Ptr<RPI::Pass> skinningPass = RPI::PassSystemInterface::Get()->FindFirstPass(skinPassFilter);
  321. if (skinningPass)
  322. {
  323. SkinnedMeshComputePass* skinnedMeshComputePass = azdynamic_cast<SkinnedMeshComputePass*>(skinningPass.get());
  324. skinnedMeshComputePass->SetFeatureProcessor(this);
  325. // There may be multiple skinning passes in the scene due to multiple pipelines, but there is only one skinning shader
  326. m_skinningShader = skinnedMeshComputePass->GetShader();
  327. if (!m_skinningShader)
  328. {
  329. AZ_Error(s_featureProcessorName, false, "Failed to get skinning pass shader. It may need to finish processing.");
  330. }
  331. else
  332. {
  333. m_cachedSkinningShaderOptions.SetShader(m_skinningShader);
  334. }
  335. }
  336. RPI::PassFilter morphPassFilter = RPI::PassFilter::CreateWithPassName(AZ::Name{ "MorphTargetPass" }, renderPipeline);
  337. RPI::Ptr<RPI::Pass> morphTargetPass = RPI::PassSystemInterface::Get()->FindFirstPass(morphPassFilter);
  338. if (morphTargetPass)
  339. {
  340. MorphTargetComputePass* morphTargetComputePass = azdynamic_cast<MorphTargetComputePass*>(morphTargetPass.get());
  341. morphTargetComputePass->SetFeatureProcessor(this);
  342. // There may be multiple morph target passes in the scene due to multiple pipelines, but there is only one morph target shader
  343. m_morphTargetShader = morphTargetComputePass->GetShader();
  344. if (!m_morphTargetShader)
  345. {
  346. AZ_Error(s_featureProcessorName, false, "Failed to get morph target pass shader. It may need to finish processing.");
  347. }
  348. }
  349. }
  350. RPI::ShaderOptionGroup SkinnedMeshFeatureProcessor::CreateSkinningShaderOptionGroup(const SkinnedMeshShaderOptions shaderOptions, SkinnedMeshShaderOptionNotificationBus::Handler& shaderReinitializedHandler)
  351. {
  352. m_cachedSkinningShaderOptions.ConnectToShaderReinitializedEvent(shaderReinitializedHandler);
  353. return m_cachedSkinningShaderOptions.CreateShaderOptionGroup(shaderOptions);
  354. }
  355. void SkinnedMeshFeatureProcessor::OnSkinningShaderReinitialized(const Data::Instance<RPI::Shader> skinningShader)
  356. {
  357. m_skinningShader = skinningShader;
  358. m_cachedSkinningShaderOptions.SetShader(m_skinningShader);
  359. }
  360. void SkinnedMeshFeatureProcessor::SetupSkinningScope(RHI::FrameGraphInterface frameGraph)
  361. {
  362. if (m_alreadyCreatedSkinningScopeThisFrame)
  363. {
  364. frameGraph.SetEstimatedItemCount(0);
  365. }
  366. else
  367. {
  368. frameGraph.SetEstimatedItemCount((u32)m_skinningDispatches.size());
  369. m_alreadyCreatedSkinningScopeThisFrame = true;
  370. }
  371. }
  372. void SkinnedMeshFeatureProcessor::SetupMorphTargetScope(RHI::FrameGraphInterface frameGraph)
  373. {
  374. if (m_alreadyCreatedMorphTargetScopeThisFrame)
  375. {
  376. frameGraph.SetEstimatedItemCount(0);
  377. }
  378. else
  379. {
  380. frameGraph.SetEstimatedItemCount((u32)m_morphTargetDispatches.size());
  381. m_alreadyCreatedMorphTargetScopeThisFrame = true;
  382. }
  383. }
  384. void SkinnedMeshFeatureProcessor::SubmitSkinningDispatchItems(const RHI::FrameGraphExecuteContext& context, uint32_t startIndex, uint32_t endIndex)
  385. {
  386. AZStd::lock_guard lock(m_dispatchItemMutex);
  387. auto it = m_skinningDispatches.begin();
  388. AZStd::advance(it, startIndex);
  389. for (uint32_t index = startIndex; index < endIndex; ++index, ++it)
  390. {
  391. const auto* dispatchItem = *it;
  392. context.GetCommandList()->Submit(dispatchItem->GetDeviceDispatchItem(context.GetDeviceIndex()), index);
  393. }
  394. }
  395. void SkinnedMeshFeatureProcessor::SubmitMorphTargetDispatchItems(
  396. const RHI::FrameGraphExecuteContext& context, uint32_t startIndex, uint32_t endIndex)
  397. {
  398. AZStd::lock_guard lock(m_dispatchItemMutex);
  399. auto it = m_morphTargetDispatches.begin();
  400. AZStd::advance(it, startIndex);
  401. for (uint32_t index = startIndex; index < endIndex; ++index, ++it)
  402. {
  403. const auto* dispatchItem = *it;
  404. context.GetCommandList()->Submit(dispatchItem->GetDeviceDispatchItem(context.GetDeviceIndex()), index);
  405. }
  406. }
  407. Data::Instance<RPI::Shader> SkinnedMeshFeatureProcessor::GetSkinningShader() const
  408. {
  409. return m_skinningShader;
  410. }
  411. Data::Instance<RPI::Shader> SkinnedMeshFeatureProcessor::GetMorphTargetShader() const
  412. {
  413. return m_morphTargetShader;
  414. }
  415. } // namespace Render
  416. } // namespace AZ