Ogre3D

그림자 처리에서 제외시 처리 사항

영스파파 2011. 1. 12. 16:18

Entity* entity->setCastShadows(false);

material material_name
{
receive_shadows off
transparency_casts_shadows off

technique
{
pass
{
}
}
}

void Ogre::Material::setReceiveShadows ( bool  enabled  );
void Ogre::Material::setTransparencyCastsShadows ( bool  enabled  );

bool bShadow = true;
Ogre::Entity* ent = ...;
Ogre::MaterialPtr mat = ent->getSubEntity(1)->getMaterial();
mat->setReceiveShadows(bShadow);
mat->setTransparencyCastsShadows(bShadow);
mat = ent->getSubEntity(2)->getMaterial();
mat->setReceiveShadows(bShadow);
mat->setTransparencyCastsShadows(bShadow);
ent->setCastShadows(bShadow);