| 1323 | } |
| 1324 | |
| 1325 | void SceneBuilder::prepareDisplacementMaps() |
| 1326 | { |
| 1327 | for (const auto& pMaterial : mSceneData.pMaterials->getMaterials()) |
| 1328 | { |
| 1329 | if (pMaterial->getTexture(Material::TextureSlot::Displacement) != nullptr) |
| 1330 | { |
| 1331 | // Remove displacement maps if requested by scene flags. |
| 1332 | if (is_set(mFlags, Flags::DontUseDisplacement)) |
| 1333 | { |
| 1334 | pMaterial->clearTexture(Material::TextureSlot::Displacement); |
| 1335 | } |
| 1336 | |
| 1337 | // Remove normal maps for materials using displacement. |
| 1338 | if (pMaterial->hasTextureSlot(Material::TextureSlot::Normal)) |
| 1339 | { |
| 1340 | pMaterial->clearTexture(Material::TextureSlot::Normal); |
| 1341 | } |
| 1342 | } |
| 1343 | } |
| 1344 | } |
| 1345 | |
| 1346 | void SceneBuilder::prepareSceneGraph() |
| 1347 | { |
nothing calls this directly
no test coverage detected