Skip to content

Commit

Permalink
samplers use mediump instead of lowp by default in GLSL ES.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Mar 23, 2024
1 parent 112270b commit 565eab4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/modules/graphics/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,17 @@ uniform LOVE_HIGHP_OR_MEDIUMP vec4 love_UniformsPerDraw[13];

static const char global_functions[] = R"(
#ifdef GL_ES
precision mediump sampler2D;
#if __VERSION__ >= 300 || defined(LOVE_EXT_TEXTURE_ARRAY_ENABLED)
precision lowp sampler2DArray;
precision mediump sampler2DArray;
#endif
#if __VERSION__ >= 300 || defined(GL_OES_texture_3D)
precision lowp sampler3D;
precision mediump sampler3D;
#endif
#if __VERSION__ >= 300 && !defined(LOVE_GLSL1_ON_GLSL3)
precision lowp sampler2DShadow;
precision lowp samplerCubeShadow;
precision lowp sampler2DArrayShadow;
precision mediump sampler2DShadow;
precision mediump samplerCubeShadow;
precision mediump sampler2DArrayShadow;
#endif
#endif
Expand Down

0 comments on commit 565eab4

Please sign in to comment.