[3.0] Ensure the use of ShaderEffect in ImageActor is backwards-compatible 44/59744/2 accepted/tizen/ivi/20160219.012722 accepted/tizen/mobile/20160218.111046 accepted/tizen/tv/20160218.111108 accepted/tizen/wearable/20160218.111132 submit/tizen/20160218.103925 submit/tizen_common/20160218.142243
authorXiangyin Ma <x1.ma@samsung.com>
Thu, 11 Feb 2016 16:37:14 +0000 (16:37 +0000)
committerTaeyoon Lee <taeyoon0.lee@samsung.com>
Thu, 18 Feb 2016 05:57:02 +0000 (21:57 -0800)
Change-Id: I699f227e72c4b3ce906a17fdb3dc940331c9ec4a

resources/scripts/shader-effect-ripple.json

index e32fc1e..423ea83 100644 (file)
@@ -51,9 +51,9 @@
     "Ripple2D": {
       "program": {
         "vertexPrefix": "",
-        "vertex": "void main(void)\n{\n  gl_Position = uMvpMatrix * vec4(aPosition*uSize.xy, 0.0, 1.0);\n  vTexCoord = mix( uTextureRect.xy, uTextureRect.zw, aPosition + vec2(0.5) );\n}\n\n",
+        "vertex": "void main(void)\n{\n  gl_Position = uMvpMatrix * vec4(aPosition, 1.0);\n  vTexCoord = mix( sTextureRect.xy, sTextureRect.zw, aTexCoord );\n}\n\n",
         "fragmentPrefix": "",
-        "fragment": "precision mediump float;\nuniform float uAmplitude; // 0.02; (< 1)\nuniform float uTime;\nvoid main()\n{\n  highp vec2 textureSize = uTextureRect.zw - uTextureRect.xy;\n  highp vec2 pos = -1.0 + 2.0 * vTexCoord.st/textureSize;\n  highp float len = length(pos);\n  highp vec2 texCoord = vTexCoord.st/textureSize + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude; \n  gl_FragColor = texture2D(sTexture, texCoord) * uColor;\n}\n\n\n",
+        "fragment": "precision mediump float;\nuniform float uAmplitude; // 0.02; (< 1)\nuniform float uTime;\nvoid main()\n{\n  highp vec2 textureSize = sTextureRect.zw - sTextureRect.xy;\n  highp vec2 pos = -1.0 + 2.0 * vTexCoord.st/textureSize;\n  highp float len = length(pos);\n  highp vec2 texCoord = vTexCoord.st/textureSize + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude; \n  gl_FragColor = texture2D(sTexture, texCoord) * uColor;\n}\n\n\n",
         "geometryType": "GEOMETRY_TYPE_IMAGE"
       },
       "geometryHints": "HINT_NONE",