Permalink
Browse files

Changed all shaders from highp to mediump. highp doesn't work on many…

… devices, including some Macs, and may reduce performance when it does work.
  • Loading branch information...
1 parent a7878a2 commit b0e5b0c9d295b4e2abd6a636ce737aeef62acb79 @brianchirls committed Feb 2, 2012
@@ -17,7 +17,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('bleach-bypass', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -74,4 +74,4 @@ Seriously.plugin('bleach-bypass', {
'see: "Saving Private Ryan", "Minority Report"'
});
-}(window));
+}(window));
@@ -54,7 +54,7 @@ Seriously.plugin('blend', (function () {
shaderSource.fragment = '#define BlendFunction ' + mode + '\n' +
'#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'#define BlendLinearDodgef BlendAddf\n' +
@@ -190,4 +190,4 @@ Seriously.plugin('blend', (function () {
};
}()) );
-}(window));
+}(window));
@@ -14,7 +14,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('chroma', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.vertex = '#ifdef GL_ES\n' +
- 'precision highp float;\n' +
+ 'precision mediump float;\n' +
'#endif \n' +
'\n' +
'attribute vec3 position;\n' +
@@ -45,7 +45,7 @@ Seriously.plugin('chroma', {
' vTexCoord = vec2(texCoord.s, texCoord.t);\n' +
'}\n';
shaderSource.fragment = '#ifdef GL_ES\n' +
- 'precision highp float;\n' +
+ 'precision mediump float;\n' +
'#endif\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -151,4 +151,4 @@ Seriously.plugin('chroma', {
description: ''
});
-}(window));
+}(window));
@@ -7,7 +7,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('color', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -32,4 +32,4 @@ Seriously.plugin('color', {
description: 'Generate color'
});
-}(window));
+}(window));
@@ -11,7 +11,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('colorcube', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n' +
- 'precision highp float;\n' +
+ 'precision mediump float;\n' +
'#endif\n' +
'uniform sampler2D source;\n' +
'uniform sampler2D colorCube;\n' +
@@ -54,4 +54,4 @@ Seriously.plugin('colorcube', {
description: ''
});
-}(window));
+}(window));
@@ -62,7 +62,7 @@ Seriously.plugin('edge', (function () {
shaderSource.fragment = defines +
'#ifdef GL_ES\n' +
- 'precision highp float;\n' +
+ 'precision mediump float;\n' +
'#endif\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -151,4 +151,4 @@ Seriously.plugin('edge', (function () {
};
}()) );
-}(window));
+}(window));
@@ -16,7 +16,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('exposure', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -57,4 +57,4 @@ Seriously.plugin('exposure', {
description: 'Exposure control'
});
-}(window));
+}(window));
@@ -7,7 +7,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('fader', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -46,4 +46,4 @@ Seriously.plugin('fader', {
description: 'Fade image to a color'
});
-}(window));
+}(window));
@@ -9,7 +9,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('hue-saturation', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.vertex = '#ifdef GL_ES\n' +
- 'precision highp float;\n' +
+ 'precision mediump float;\n' +
'#endif \n' +
'\n' +
'attribute vec3 position;\n' +
@@ -35,7 +35,7 @@ Seriously.plugin('hue-saturation', {
' vTexCoord = vec2(texCoord.s, texCoord.t);\n' +
'}\n';
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -96,4 +96,4 @@ Seriously.plugin('hue-saturation', {
description: 'Rotate hue and multiply saturation.'
});
-}(window));
+}(window));
@@ -7,7 +7,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('invert', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -33,4 +33,4 @@ Seriously.plugin('invert', {
description: 'Invert image color'
});
-}(window));
+}(window));
@@ -7,7 +7,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('lumakey', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -57,4 +57,4 @@ Seriously.plugin('lumakey', {
description: ''
});
-}(window));
+}(window));
@@ -10,7 +10,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('nightvision', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -71,4 +71,4 @@ Seriously.plugin('nightvision', {
description: ''
});
-}(window));
+}(window));
@@ -8,7 +8,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('ripple', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -57,4 +57,4 @@ Seriously.plugin('ripple', {
description: ''
});
-}(window));
+}(window));
@@ -7,7 +7,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('scanlines', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -58,4 +58,4 @@ Seriously.plugin('scanlines', {
description: ''
});
-}(window));
+}(window));
@@ -10,7 +10,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('sepia', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -46,4 +46,4 @@ Seriously.plugin('sepia', {
description: ''
});
-}(window));
+}(window));
@@ -14,7 +14,7 @@ Seriously.plugin('split', (function () {
baseShader = new Seriously.util.ShaderProgram(this.gl, shaderSource.vertex, shaderSource.fragment);
shaderSource.vertex = '#ifdef GL_ES\n' +
- 'precision highp float;\n' +
+ 'precision mediump float;\n' +
'#endif \n' +
'\n' +
'attribute vec3 position;\n' +
@@ -40,7 +40,7 @@ Seriously.plugin('split', (function () {
' vTexCoord = vec2(texCoord.s, texCoord.t);\n' +
'}\n';
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -7,7 +7,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('tone', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -66,4 +66,4 @@ Seriously.plugin('tone', {
description: ''
});
-}(window));
+}(window));
@@ -7,7 +7,7 @@ window.Seriously = window.Seriously ||
Seriously.plugin('vignette', {
shader: function(inputs, shaderSource, utilities) {
shaderSource.fragment = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +
@@ -41,4 +41,4 @@ Seriously.plugin('vignette', {
description: 'Vignette'
});
-}(window));
+}(window));
View
@@ -2656,7 +2656,7 @@ function Seriously(options) {
//todo: load, save, find
baseVertexShader = '#ifdef GL_ES\n' +
- 'precision highp float;\n' +
+ 'precision mediump float;\n' +
'#endif \n' +
'\n' +
'attribute vec3 position;\n' +
@@ -2674,7 +2674,7 @@ function Seriously(options) {
'}\n';
baseFragmentShader = '#ifdef GL_ES\n\n' +
- 'precision highp float;\n\n' +
+ 'precision mediump float;\n\n' +
'#endif\n\n' +
'\n' +
'varying vec2 vTexCoord;\n' +

0 comments on commit b0e5b0c

Please sign in to comment.