remove material
| 36 | |
| 37 | // remove material |
| 38 | bool Tr2RaytracingPipelineStateManager::AddLibrary( BlueSharedStringW& rayGenName, BlueSharedStringW& missName, Tr2Material* material, const BlueSharedString& techniqueName ) |
| 39 | { |
| 40 | if( !material ) |
| 41 | { |
| 42 | return false; |
| 43 | } |
| 44 | auto shader = material->GetShaderStateInterface(); |
| 45 | if( !shader ) |
| 46 | { |
| 47 | return false; |
| 48 | } |
| 49 | uint32_t techniqueIndex; |
| 50 | if( !shader->GetTechniqueIndex( techniqueName, techniqueIndex ) ) |
| 51 | { |
| 52 | return false; |
| 53 | } |
| 54 | auto& desc = shader->GetEffectDescription(); |
| 55 | if( desc.techniques[techniqueIndex].libraries.empty() ) |
| 56 | { |
| 57 | return false; |
| 58 | } |
| 59 | |
| 60 | AddLibrary( rayGenName, missName, desc.techniques[techniqueIndex].libraries[0] ); |
| 61 | return true; |
| 62 | } |
| 63 | |
| 64 | void Tr2RaytracingPipelineStateManager::AddLibrary( BlueSharedStringW& rayGenName, BlueSharedStringW& missName, const Tr2EffectLibrary& library ) |
| 65 | { |
no test coverage detected