Declare precision also in vertex shaders in GLES renderer.
Some drivers complain that it was declared only in fragment shaders.
This commit is contained in:
parent
084fa04012
commit
5abc047b0c
@ -1,5 +1,7 @@
|
||||
#version 300 es
|
||||
|
||||
precision mediump float;
|
||||
|
||||
in vec3 Position;
|
||||
in vec2 Texcoord;
|
||||
out vec2 uv;
|
||||
|
@ -110,6 +110,10 @@ GLuint ShaderBase::loadShader(const std::string &file, unsigned type)
|
||||
//shader compilation fails with some drivers if there is no precision qualifier
|
||||
if (type == GL_FRAGMENT_SHADER)
|
||||
code << "precision mediump float;\n";
|
||||
#if defined(USE_GLES2)
|
||||
else if (type == GL_VERTEX_SHADER)
|
||||
code << "precision mediump float;\n";
|
||||
#endif
|
||||
|
||||
code << getHeader();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user