X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fshader-effects%2Firis-effect.cpp;h=38a83dd65cd67c283712ee3416f5d27fd740c331;hb=f441aaa6d92cdb2d2a11d026aae1e98b3f6d7c76;hp=7c49ab9d78f53c002dba71a1ca8b3dcca673a92c;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/shader-effects/iris-effect.cpp b/dali-toolkit/public-api/shader-effects/iris-effect.cpp index 7c49ab9..38a83dd 100644 --- a/dali-toolkit/public-api/shader-effects/iris-effect.cpp +++ b/dali-toolkit/public-api/shader-effects/iris-effect.cpp @@ -1,18 +1,19 @@ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ #include namespace Dali @@ -47,11 +48,11 @@ IrisEffect IrisEffect::New() // append the default version std::string vertexShader( "uniform mediump vec2 uCenter;\n" - "varying vec2 vRelativePosition;\n" + "varying mediump vec2 vRelativePosition;\n" "\n" "void main()\n" "{\n" - " vec4 world = uModelView * vec4(aPosition,1.0);\n" + " mediump vec4 world = uModelView * vec4(aPosition,1.0);\n" " gl_Position = uProjection * world;\n" " \n" " vTexCoord = aTexCoord;\n" @@ -59,12 +60,12 @@ IrisEffect IrisEffect::New() "}\n"); std::string fragmentShader( - "uniform float uRadius; \n" - "uniform float uBlendFactor; \n" - "varying vec2 vRelativePosition; \n" + "uniform mediump float uRadius; \n" + "uniform mediump float uBlendFactor; \n" + "varying mediump vec2 vRelativePosition; \n" "void main() \n" "{ \n" - " float delta = (length(vRelativePosition) - uRadius); \n" + " mediump float delta = (length(vRelativePosition) - uRadius); \n" " delta = clamp(0.0 - delta * uBlendFactor, 0.0, 1.0); \n" " gl_FragColor = texture2D(sTexture, vTexCoord) * uColor; \n" " gl_FragColor.a *= delta; \n" @@ -117,4 +118,3 @@ const std::string& IrisEffect::GetCenterPropertyName() const } } -