diff options
Diffstat (limited to 'drivers/gles3/shader_gles3.cpp')
-rw-r--r-- | drivers/gles3/shader_gles3.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index f1077e2d20..20956ad644 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -102,11 +102,11 @@ void ShaderGLES3::bind_uniforms() { uniforms_dirty = false; } -GLint ShaderGLES3::get_uniform_location(int p_idx) const { +GLint ShaderGLES3::get_uniform_location(int p_index) const { ERR_FAIL_COND_V(!version, -1); - return version->uniform_location[p_idx]; + return version->uniform_location[p_index]; } bool ShaderGLES3::bind() { @@ -273,6 +273,11 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() { //vertex precision is high strings.push_back("precision highp float;\n"); strings.push_back("precision highp int;\n"); +#ifndef GLES_OVER_GL + strings.push_back("precision highp sampler2D;\n"); + strings.push_back("precision highp samplerCube;\n"); + strings.push_back("precision highp sampler2DArray;\n"); +#endif #if 0 if (cc) { @@ -371,6 +376,11 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() { //fragment precision is medium strings.push_back("precision highp float;\n"); strings.push_back("precision highp int;\n"); +#ifndef GLES_OVER_GL + strings.push_back("precision highp sampler2D;\n"); + strings.push_back("precision highp samplerCube;\n"); + strings.push_back("precision highp sampler2DArray;\n"); +#endif #if 0 if (cc) { |