void Material::CheckOcclusion() { // Determine occlusion by checking the base pass of each technique occlusion_ = false; for (unsigned i = 0; i < techniques_.Size(); ++i) { Technique* tech = techniques_[i].technique_; if (tech) { Pass* pass = tech->GetPass(PASS_BASE); if (pass && pass->GetDepthWrite() && !pass->GetAlphaMask()) occlusion_ = true; } } }