Ejemplo n.º 1
0
void DeferredLight::updateFromParent() {
    setAttenuation(parentLight->getAttenuationConstant(), parentLight->getAttenuationLinear(), parentLight->getAttenuationQuadric());
    setSpecularColour(parentLight->getSpecularColour());

    if (getCastChadows()) {
        ENABLE_BIT(permutation,LightMaterialGenerator::MI_SHADOW_CASTER);
    } else {
        DISABLE_BIT(permutation, LightMaterialGenerator::MI_SHADOW_CASTER);
    }
}
Ejemplo n.º 2
0
void DeferredLight::UpdateFromParent()
{
    // TODO : Don't do this unless something changed
    SetAttenuation(mParentLight->getAttenuationConstant(), mParentLight->getAttenuationLinear(),
                    mParentLight->getAttenuationQuadric());
    SetSpecularColour(mParentLight->getSpecularColour());

    if (getCastChadows())
    {
        ENABLE_BIT(mPermutation, LightMaterialGenerator::MI_SHADOW_CASTER);
    }
    else
    {
        DISABLE_BIT(mPermutation, LightMaterialGenerator::MI_SHADOW_CASTER);
    }
}