Merge pull request #2365 from Elderme/shader_precision

Add default precision qualifier in fragment shaders
This commit is contained in:
auriamg 2015-11-01 20:02:18 -05:00
commit 9d456c5459

View File

@ -65,6 +65,11 @@ GLuint ShaderBase::loadShader(const std::string &file, unsigned type)
std::ostringstream code;
code << "#version " << CVS->getGLSLVersion()<<"\n";
//shader compilation fails with some drivers if there is no precision qualifier
if (type == GL_FRAGMENT_SHADER)
code << "precision mediump float;\n";
if (CVS->isAMDVertexShaderLayerUsable())
code << "#extension GL_AMD_vertex_shader_layer : enable\n";
if (CVS->isAZDOEnabled())