Fixed shader effects that were doing calculations in view space.
Fixed controls that were using FREE_LOOK camera without orienting it.
Change-Id: Ib7330adf9a1344b03583c2cb6a9ef958df5d28b4
Signed-off-by: Francisco Santos <f1.santos@samsung.com>
// Create a cameraActor for the off screen render task.
mCameraActor = CameraActor::New(mMovementArea);
mCameraActor.SetParentOrigin(ParentOrigin::CENTER);
- mCameraActor.SetInvertYAxis(false);
Stage::GetCurrent().Add(mCameraActor);
}
{
const Vector3& sourcePosition = sourcePositionProperty.GetVector3();
- return Vector3(sourcePosition.x + mStageSize.x * 0.5f,
- -sourcePosition.y + mStageSize.y * 0.5f,
- sourcePosition.z + mDefaultCameraDistance);
+ return Vector3( sourcePosition.x + mStageSize.x * 0.5f,
+ sourcePosition.y + mStageSize.y * 0.5f,
+ sourcePosition.z + mDefaultCameraDistance);
}
Vector2 mStageSize;
mCameraActor.SetParentOrigin(ParentOrigin::CENTER);
mCameraActor.SetPositionInheritanceMode( DONT_INHERIT_POSITION );
mCameraActor.SetInheritScale( false );
- mCameraActor.SetInvertYAxis(false);
Self().Add(mCameraActor);
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
Vector2 stageSize = Stage::GetCurrent().GetSize();
mCameraActor = CameraActor::New(stageSize);
+
mCameraActor.SetParentOrigin( ParentOrigin::CENTER );
// Target is constrained to point at the shadow plane origin
mCameraActor.SetNearClippingPlane( 1.0f );
mCameraActor.SetType( Dali::Camera::FREE_LOOK ); // Camera orientation constrained to point at shadow plane world position
- mCameraActor.SetInvertYAxis(false);
+ mCameraActor.SetRotation(Radian(Degree(180)), Vector3::YAXIS);
mCameraActor.SetPosition(DEFAULT_LIGHT_POSITION);
mShadowRenderShader = ShaderEffect::New( RENDER_SHADOW_VERTEX_SOURCE, RENDER_SHADOW_FRAGMENT_SOURCE,
Actor self = Self();
self.Add( mOffscreenRootActor );
self.Add( mOffscreenImageActor );
+ mOffscreenImageActor.SetScale(Vector3(1.f, -1.f, 1.f));
}
else
{
mOffscreenCameraActor = CameraActor::New();
mOffscreenCameraActor.SetParentOrigin( ParentOrigin::CENTER );
mOffscreenCameraActor.SetAnchorPoint( AnchorPoint::CENTER );
+ mOffscreenCameraActor.SetRotation(Degree(180.f), Vector3::YAXIS);
mOffscreenCameraActor.SetType( Dali::Camera::FREE_LOOK ); // Inherits position from the offscreen root actor.
mOffscreenRootActor.Add( mOffscreenCameraActor ); // camera to shoot the offscreen text
-
- // Images are expected to be from top to bottom, but OpenGL buffers are bottom to top
- mOffscreenCameraActor.SetInvertYAxis( false );
}
// Calculate camera parameters for current text size.
" vec2 d = (world.xy - uCenter) * uAnglePerUnit;\n"
" float a = length(d);\n"
" float cs = cos(radians(a));\n"
- " world.z += cs * uRadius;\n"
+ " world.z -= cs * uRadius;\n"
" gl_Position = uProjection * world;\n"
" \n"
" vTexCoord = aTexCoord;\n"