Merge "Added code for stylable transitions" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / shader-effects / carousel-effect.h
index d243a81..393e1e4 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_CAROUSEL_EFFECT_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
 
 namespace Dali
 {
@@ -63,20 +63,19 @@ inline ShaderEffect CreateCarouselEffect()
                 "\n"
                 "void main()\n"
                 "{\n"
-                "    mediump vec4 world = uModelView * vec4(aPosition,1.0);\n"
+                "    mediump vec4 world = uModelView * vec4(aPosition, 1.0);\n"
                 "    mediump vec2 d = (world.xy - uCenter) * uAnglePerUnit;\n"
                 "    mediump float a = length(d);\n"
                 "    mediump float cs = cos(radians(a));\n"
                 "    world.z -= cs * uRadius;\n"
                 "    gl_Position = uProjection * world;\n"
                 "    \n"
-                "    vTexCoord = aTexCoord;\n"
+                "    vTexCoord = mix( sTextureRect.xy, sTextureRect.zw, aTexCoord );\n"
                 "}\n");
 
     ShaderEffect shaderEffect = ShaderEffect::New(
         vertexShader,
         "",
-        GeometryType( GEOMETRY_TYPE_IMAGE ),
         ShaderEffect::GeometryHints( ShaderEffect::HINT_GRID | ShaderEffect::HINT_DEPTH_BUFFER ));