-#ifndef __DALI_TOOLKIT_INTERNAL_BUBBLE_EFFECT_H_
-#define __DALI_TOOLKIT_INTERNAL_BUBBLE_EFFECT_H_
+#ifndef DALI_TOOLKIT_INTERNAL_BUBBLE_EFFECT_H
+#define DALI_TOOLKIT_INTERNAL_BUBBLE_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.
// EXTERNAL INCLUDES
#include <sstream>
-#include <dali/devel-api/rendering/shader.h>
+#include <dali/public-api/rendering/shader.h>
namespace Dali
{
{
/**
- * Create the shader to be used by the material
+ * Create the shader to be used by the renderer
* @param[in] numberOfBubble How many groups of uniforms are used to control the bubble movement.
* @return A handle to the newly created shader.
*/
vTexCoord = aTexCoord;\n
vPercentage = percentage;\n
// Use the emit position color for the bubble
- vEffectTexCoord = startAndEnd.xy * uInvertedMovementArea;\n
+ vEffectTexCoord = startAndEnd.xy * uInvertedMovementArea + vec2(0.5);\n
}\n
);
{\n
// Get the emit pisition color, and Mix with the actor color
mediump vec4 fragColor = texture2D(sBackground, vEffectTexCoord)*uColor;\n
- // Apply the shape defined by the texture contained in the material
+ // Apply the shape defined by the texture contained sBubbleShape
// And make the opacity being 0.7, and animate from 0.7 to 0 during the last 1/3 of movement
fragColor.a *= texture2D(sBubbleShape, vTexCoord).a * ( 2.1 - max( vPercentage*2.1, 1.4 ) );\n
gl_FragColor = fragColor;\n
} // namespace Toolkit
} // namespace Dali
-#endif /* __DALI_TOOLKIT_INTERNAL_BUBBLE_EFFECT_H_ */
+#endif // DALI_TOOLKIT_INTERNAL_BUBBLE_EFFECT_H