| 648 | } |
| 649 | |
| 650 | MaterialSystem::MaterialStats MaterialSystem::getStats() const |
| 651 | { |
| 652 | FALCOR_CHECK(!mMaterialsChanged, "Materials have changed. Call update() first."); |
| 653 | |
| 654 | MaterialStats s = {}; |
| 655 | |
| 656 | s.materialTypeCount = mMaterialTypes.size(); |
| 657 | s.materialCount = mMaterials.size(); |
| 658 | s.materialOpaqueCount = 0; |
| 659 | s.materialMemoryInBytes += mpMaterialDataBuffer ? mpMaterialDataBuffer->getSize() : 0; |
| 660 | |
| 661 | for (const auto& pMaterial : mMaterials) |
| 662 | { |
| 663 | if (pMaterial->isOpaque()) s.materialOpaqueCount++; |
| 664 | } |
| 665 | |
| 666 | const auto textureStats = mpTextureManager->getStats(); |
| 667 | s.textureCount = textureStats.textureCount; |
| 668 | s.textureCompressedCount = textureStats.textureCompressedCount; |
| 669 | s.textureTexelCount = textureStats.textureTexelCount; |
| 670 | s.textureTexelChannelCount = textureStats.textureTexelChannelCount; |
| 671 | s.textureMemoryInBytes = textureStats.textureMemoryInBytes; |
| 672 | |
| 673 | return s; |
| 674 | } |
| 675 | |
| 676 | void MaterialSystem::loadLightProfile(const std::filesystem::path& absoluteFilename, bool normalize) |
| 677 | { |
no test coverage detected