#define __DALI_TOOLKIT_SHADER_EFFECT_MOTION_BLUR_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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 <dali/public-api/actors/image-actor.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/public-api/actors/actor.h>
+#include <dali/public-api/animation/constraint.h>
+#include <dali/public-api/object/property-map.h>
+#include <dali/public-api/rendering/shader.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
namespace Dali
{
/**
* @brief Set the properties for the motion blur
*
- * @param numBlurSamples Number of samples used by the shader
+ * @param[in] actor The actor that registers the uniform properties
+ * @param[in] numBlurSamples Number of samples used by the shader
*/
inline void SetMotionBlurProperties( Actor& actor, unsigned int numBlurSamples = 8 )
{
* "uObjectFadeStart" - The displacement from the centre of the actor that the actor will start to fade towards its
* edges. This is used to prevent an unsightly hard edge between the blurred actor and the scene.
* Depends on the values of the vertices in the vertex stream. When the actor is at rest this is
- * not applied. Default 0.25, which is half way towards the edge for an ImageRenderer::QUAD.
+ * not applied. Default 0.25, which is half way towards the edge for an ImageVisual::QUAD.
* "uObjectFadeEnd" - The displacement from the centre of the actor that the actor will finish fading towards its
* edges. This is used to prevent an unsightly hard edge between the blurred actor and the scene.
* Depends on the values of the vertices in the vertex stream. When the actor is at rest this is
- * not applied.Default 0.5, which is all the way towards the edge for an ImageRenderer::QUAD.
+ * not applied.Default 0.5, which is all the way towards the edge for an ImageVisual::QUAD.
* "uAlphaScale" - Global scaler applied to the alpha of the actor. Used to make the blurred actor a bit more subtle
* (helps to hide discontinuities due to limited number of texture samples) and reveal a bit of the
* background behind it as it moves. When the actor is at rest this is not applied. Default 0.75.
Property::Map map;
Property::Map customShader;
- customShader[ "vertex-shader" ] = vertexSource;
- customShader[ "fragment-shader" ] = fragmentSource;
+ customShader[ Visual::Shader::Property::VERTEX_SHADER ] = vertexSource;
+ customShader[ Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentSource;
- customShader[ "subdivide-grid-x" ] = 10;
- customShader[ "subdivide-grid-y" ] = 10;
+ customShader[ Visual::Shader::Property::SUBDIVIDE_GRID_X ] = 10;
+ customShader[ Visual::Shader::Property::SUBDIVIDE_GRID_Y ] = 10;
- // NOTE: we must turn on alpha blending for the actor (HINT_BLENDING)
- customShader[ "hints" ] = "output-is-transparent";
+ customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT;
- map[ "shader" ] = customShader;
+ map[ Toolkit::Visual::Property::SHADER ] = customShader;
return map;
}