"Ripple2D": {
"program": {
"vertexPrefix": "",
- "vertex": "void main(void)\n{\n gl_Position = uMvpMatrix * vec4(aPosition, 1.0);\n vTexCoord = mix( sTextureRect.xy, sTextureRect.zw, aTexCoord );\n}\n\n",
+ "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",
"fragmentPrefix": "",
- "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",
+ "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",
"geometryType": "GEOMETRY_TYPE_IMAGE"
},
"geometryHints": "HINT_NONE",