MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / prepareDisplacementMaps

Method prepareDisplacementMaps

Source/Falcor/Scene/SceneBuilder.cpp:1325–1344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 2

clearTextureMethod · 0.80
getTextureMethod · 0.45

Tested by

no test coverage detected