Fixed bug with android 8.0 and opengl

This commit is contained in:
=
2018-05-05 12:36:34 +02:00
parent c4da4d96ac
commit 7363b7d5cc
13 changed files with 239 additions and 37 deletions

View File

@ -9,12 +9,15 @@ varying vec2 pass_TexCoords;
void main() {
vec2 scale = vec2(1.0, 1.0);
if(texCoordScaling.x != 0.0)
scale.x = texCoordScaling.x;
if(texCoordScaling.y != 0.0)
scale.y *= texCoordScaling.y;
vec4 transformatedPosition = transformationMatrix * position;
gl_Position = mvpMatrix * transformatedPosition;
pass_TexCoords = texCoords;
if(texCoordScaling.x != 0.0)
pass_TexCoords.x *= texCoordScaling.x;
if(texCoordScaling.y != 0.0)
pass_TexCoords.y *= texCoordScaling.y;
pass_TexCoords = scale * texCoords;
}