From 2d48f4ecf1770cc48274c65051b4c3cc0748ddda Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 14 Aug 2017 20:00:16 +0200 Subject: Use precision for samples only when #version 300 es Fix #10332 --- drivers/gles3/shader_gles3.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 77e257dfc8..e7a26c0354 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -273,9 +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) { @@ -374,9 +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) { -- cgit v1.2.3