diff --git a/AVQt/texture.fsh b/AVQt/texture.fsh index e7642a445f567285eec8ce498f5b50eacb339076..6a1fdcd7757aacaa7dd1c9f09b9bd154f8c8aa2b 100644 --- a/AVQt/texture.fsh +++ b/AVQt/texture.fsh @@ -1,5 +1,11 @@ // fragment shader +#ifdef GL_ES +// Set default precision to medium +precision mediump int; +precision mediump float; +#endif + in vec4 fragColor;// input: interpolated color as rgba-value in vec2 texCoord;// input: texture coordinate (xy-coordinates) out vec4 finalColor;// output: final color value as rgba-value diff --git a/AVQt/texture.vsh b/AVQt/texture.vsh index 1c47710c61b94905f34afeaf2cdd50a5ea3eaf9a..83caa39e01b930166a2641b00198de9457550ed2 100644 --- a/AVQt/texture.vsh +++ b/AVQt/texture.vsh @@ -1,12 +1,18 @@ // vertex shader -layout(location = 0) in vec3 position; // input: attribute with index '0' with 3 elements per vertex +#ifdef GL_ES +// Set default precision to medium +precision mediump int; +precision mediump float; +#endif + +layout(location = 0) in vec3 position;// input: attribute with index '0' with 3 elements per vertex //layout(location = 1) in vec3 color; // input: attribute with index '1' with 3 elements (=rgb) per vertex -layout(location = 1) in vec2 texcoords; // input: attribute with index '2' with 2 elements per vertex +layout(location = 1) in vec2 texcoords;// input: attribute with index '2' with 2 elements per vertex //layout(location = 2) in float texnr; // input: attribute with index '3' with 1 float per vertex -out vec4 fragColor; // output: computed fragmentation color -out vec2 texCoord; // output: computed texture coordinates +out vec4 fragColor;// output: computed fragmentation color +out vec2 texCoord;// output: computed texture coordinates //flat out float texID; // output: texture ID - mind the 'flat' attribute! void main() {