X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbubble-effect%2Fbubble-effect.h;h=65b485f73115b41943c365d897fdfa05f7a91d7b;hp=9d0e24fb65b9f5b925b1f8090f558d2db5e04707;hb=b1e8521ad77e7b4e62b59613b2edef64429130e9;hpb=d3a00dc1c24ece2488696c0b518013ad6d97969b diff --git a/dali-toolkit/internal/controls/bubble-effect/bubble-effect.h b/dali-toolkit/internal/controls/bubble-effect/bubble-effect.h index 9d0e24f..65b485f 100644 --- a/dali-toolkit/internal/controls/bubble-effect/bubble-effect.h +++ b/dali-toolkit/internal/controls/bubble-effect/bubble-effect.h @@ -1,8 +1,8 @@ -#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. @@ -20,7 +20,7 @@ // EXTERNAL INCLUDES #include -#include +#include namespace Dali { @@ -32,7 +32,7 @@ namespace Internal { /** - * 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. */ @@ -92,7 +92,7 @@ inline Shader CreateBubbleShader( unsigned int numBubble ) 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 ); @@ -108,7 +108,7 @@ inline Shader CreateBubbleShader( unsigned int numBubble ) {\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 @@ -128,4 +128,4 @@ inline Shader CreateBubbleShader( unsigned int numBubble ) } // namespace Toolkit } // namespace Dali -#endif /* __DALI_TOOLKIT_INTERNAL_BUBBLE_EFFECT_H_ */ +#endif // DALI_TOOLKIT_INTERNAL_BUBBLE_EFFECT_H