Shadow was being rendered on top of the text when using a 3D layer.
To ensure shadow is rendered behind the text, the depth-index of the shadow
must be smaller than the depth index of the text.
Change-Id: I702433ceef51a08d57872ba49753a6cfedd24d94
Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material );
- // Ensure shadow is behind the text...
- renderer.SetDepthIndex( CONTENT_DEPTH_INDEX + mDepth );
+ // Set depth index to -1.0 to make sure shadow is rendered first in 3D layers
+ renderer.SetDepthIndex( -1.0f );
Actor actor = Actor::New();
actor.AddRenderer( renderer );
actor.SetParentOrigin( ParentOrigin::CENTER ); // Keep all of the origins aligned