Commit 0a75ccea17f07a37a40cda78c8f9678956eb229d

Authored by Adeel Kazmi
1 parent aafb58d2

Split shaders in JSONs over multiple lines

Change-Id: I231d03ba20e15626ed7d6020d65fbbac3411ccff
resources/scripts/shader-effect-ripple.json
... ... @@ -16,7 +16,21 @@
16 16 "desiredWidth": 400,
17 17 "desiredHeight": 400,
18 18 "shader": {
19   - "fragmentShader": "precision mediump float;\nuniform sampler2D sTexture;\nuniform vec4 uColor;\nuniform float uAmplitude;\nuniform float uTime;\nvarying vec2 vTexCoord;\nvoid main()\n{\n highp vec2 pos = -1.0 + 2.0 * vTexCoord;\n highp float len = length(pos);\n highp vec2 texCoord = vTexCoord + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;\n gl_FragColor = texture2D(sTexture, texCoord) * uColor;}\n\n"
  19 + "fragmentShader": [
  20 + "precision mediump float;",
  21 + "uniform sampler2D sTexture;",
  22 + "uniform vec4 uColor;",
  23 + "uniform float uAmplitude;",
  24 + "uniform float uTime;",
  25 + "varying vec2 vTexCoord;",
  26 + "void main()",
  27 + "{",
  28 + " highp vec2 pos = -1.0 + 2.0 * vTexCoord;",
  29 + " highp float len = length(pos);",
  30 + " highp vec2 texCoord = vTexCoord + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;",
  31 + " gl_FragColor = texture2D(sTexture, texCoord) * uColor;",
  32 + "}"
  33 + ]
20 34 }
21 35 },
22 36 "animatableProperties": {
... ...