Skip to content

Commit

Permalink
Add precision highp sampler2D everywhere so our winding numbers don…
Browse files Browse the repository at this point in the history
…'t get clipped

Closes rust-windowing#280.
  • Loading branch information
pcwalton committed Mar 27, 2020
1 parent 7b53cc6 commit 6eb0232
Show file tree
Hide file tree
Showing 36 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/shaders/gl3/blit.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform sampler2D uSrc;

Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/blit.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

in ivec2 aPosition;

Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/debug_solid.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform vec4 uColor;

Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/debug_solid.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform vec2 uFramebufferSize;

Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/debug_texture.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform sampler2D uTexture;
uniform vec4 uColor;
Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/debug_texture.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform vec2 uFramebufferSize;
uniform vec2 uTextureSize;
Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/demo_ground.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform vec4 uGroundColor;
uniform vec4 uGridlineColor;
Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/demo_ground.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform mat4 uTransform;
uniform int uGridlineCount;
Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/fill.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform sampler2D uAreaLUT;

Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/fill.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform vec2 uFramebufferSize;
uniform vec2 uTileSize;
Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/reproject.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform mat4 uOldTransform;
uniform sampler2D uTexture;
Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/reproject.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform mat4 uNewTransform;

Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/stencil.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

out vec4 oFragColor;

Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/stencil.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

in vec3 aPosition;

Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/tile.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#extension GL_GOOGLE_include_directive : enable

precision highp float;
precision highp sampler2D;



Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/tile.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform mat4 uTransform;
uniform vec2 uTileSize;
Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/tile_copy.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform vec2 uFramebufferSize;
uniform sampler2D uSrc;
Expand Down
1 change: 1 addition & 0 deletions resources/shaders/gl3/tile_copy.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


precision highp float;
precision highp sampler2D;

uniform mat4 uTransform;
uniform vec2 uTileSize;
Expand Down
1 change: 1 addition & 0 deletions shaders/blit.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform sampler2D uSrc;

Expand Down
1 change: 1 addition & 0 deletions shaders/blit.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

in ivec2 aPosition;

Expand Down
1 change: 1 addition & 0 deletions shaders/debug_solid.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform vec4 uColor;

Expand Down
1 change: 1 addition & 0 deletions shaders/debug_solid.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform vec2 uFramebufferSize;

Expand Down
1 change: 1 addition & 0 deletions shaders/debug_texture.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform sampler2D uTexture;
uniform vec4 uColor;
Expand Down
1 change: 1 addition & 0 deletions shaders/debug_texture.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform vec2 uFramebufferSize;
uniform vec2 uTextureSize;
Expand Down
1 change: 1 addition & 0 deletions shaders/demo_ground.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform vec4 uGroundColor;
uniform vec4 uGridlineColor;
Expand Down
1 change: 1 addition & 0 deletions shaders/demo_ground.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform mat4 uTransform;
uniform int uGridlineCount;
Expand Down
1 change: 1 addition & 0 deletions shaders/fill.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform sampler2D uAreaLUT;

Expand Down
1 change: 1 addition & 0 deletions shaders/fill.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform vec2 uFramebufferSize;
uniform vec2 uTileSize;
Expand Down
1 change: 1 addition & 0 deletions shaders/reproject.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform mat4 uOldTransform;
uniform sampler2D uTexture;
Expand Down
1 change: 1 addition & 0 deletions shaders/reproject.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform mat4 uNewTransform;

Expand Down
1 change: 1 addition & 0 deletions shaders/stencil.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

out vec4 oFragColor;

Expand Down
1 change: 1 addition & 0 deletions shaders/stencil.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

in vec3 aPosition;

Expand Down
1 change: 1 addition & 0 deletions shaders/tile.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#extension GL_GOOGLE_include_directive : enable

precision highp float;
precision highp sampler2D;

#define EPSILON 0.00001

Expand Down
1 change: 1 addition & 0 deletions shaders/tile.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform mat4 uTransform;
uniform vec2 uTileSize;
Expand Down
1 change: 1 addition & 0 deletions shaders/tile_copy.fs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform vec2 uFramebufferSize;
uniform sampler2D uSrc;
Expand Down
1 change: 1 addition & 0 deletions shaders/tile_copy.vs.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// except according to those terms.

precision highp float;
precision highp sampler2D;

uniform mat4 uTransform;
uniform vec2 uTileSize;
Expand Down

0 comments on commit 6eb0232

Please sign in to comment.