+ // Note that the renderer indices are depending on the order they been added to the actor
+ // which might be different from the blur level of its texture.
+ // We can check the depth index of the renderer to know which blurred image it renders.
+ // All visuals WILL have renderers at this point as we are simply creating visuals with an Image handle.
+ Renderer renderer = self.GetRendererAt( i );
+ int depthIndex = renderer.GetProperty<int>(Renderer::Property::DEPTH_INDEX);
+ if( depthIndex > 0 )
+ {
+ Property::Index index = renderer.RegisterProperty( ALPHA_UNIFORM_NAME, 0.f );
+ Constraint constraint = Constraint::New<float>( renderer, index, ActorOpacityConstraint(mBlurLevels, depthIndex-1) );
+ constraint.AddSource( Source( self, mBlurStrengthPropertyIndex ) );
+ constraint.Apply();
+ }