Remove/Move experimental features
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / shader-effects / bendy-effect.h
index 79edb16..78f4e69 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_SHADER_EFFECT_BENDY_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
 {
@@ -52,7 +52,7 @@ inline ShaderEffect CreateBendyEffect()
       "void main()\n"
       "{\n"
       " mediump float lighting = 0.25;\n"
-      " mediump vec4 position = uModelView * vec4(aPosition,1.0);\n"
+      " mediump vec4 position = uModelView * vec4(aPosition, 1.0);\n"
       "\n"
       " mediump vec2 d = position.xy - uCenter;\n"
       " mediump float dist = max( 0.0, dot(d,uDirection) );\n"
@@ -70,7 +70,7 @@ inline ShaderEffect CreateBendyEffect()
       "\n"
       "vShade = 1.0 - abs(sn) * lighting;\n"
       "\n"
-      "vTexCoord = aTexCoord;\n"
+      "vTexCoord = mix( sTextureRect.xy, sTextureRect.zw, aTexCoord );\n"
       "}" );
 
   std::string fragmentShader(
@@ -85,7 +85,6 @@ inline ShaderEffect CreateBendyEffect()
   Dali::ShaderEffect shaderEffect =  Dali::ShaderEffect::New(
       vertextShader,
       fragmentShader,
-      GeometryType( GEOMETRY_TYPE_IMAGE ),
       ShaderEffect::GeometryHints( ShaderEffect::HINT_GRID | ShaderEffect::HINT_DEPTH_BUFFER ));
 
   shaderEffect.SetUniform( "uCenter", Vector2(0.0f, 0.0f), ShaderEffect::COORDINATE_TYPE_VIEWPORT_POSITION );