Permalink
Browse files

Minor change in background gradient calculation.

  • Loading branch information...
1 parent 1f10952 commit 51d7f9a568f680a74262c3dfca6e47f004cc3684 @harism committed May 16, 2012
Showing with 7 additions and 4 deletions.
  1. +2 −2 AndroidManifest.xml
  2. +5 −2 res/values/shaders.xml
View
@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
package="fi.harism.wallpaper.flowers"
- android:versionCode="9"
- android:versionName="3.14159" >
+ android:versionCode="10"
+ android:versionName="3.2" >
<uses-sdk android:minSdkVersion="8" />
View
@@ -40,8 +40,11 @@
varying vec2 vTextureCoord;
void main() {
gl_FragColor = texture2D(sTexture, vTextureCoord);
- float brightness = length(vTextureCoord - 0.5) * 1.3;
- gl_FragColor.rgb *= 1.0 - brightness * brightness;
+
+ const float sqrt2 = 1.414213562373;
+ float len = length(vTextureCoord - 0.5) * sqrt2;
+ len = smoothstep(0.3, 1.0, len);
+ gl_FragColor.rgb *= mix(0.3, 1.0, 1.0 - len);
}
</string>
<string name="shader_spline_vs">

0 comments on commit 51d7f9a

Please sign in to comment.