Skip to content

Commit 10a0bb1

Browse files
authored
uses the same precision for uniforms (#20107)
1 parent e73b7f1 commit 10a0bb1

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

cocos/renderer/CCGLProgram.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ bool GLProgram::compileShader(GLuint * shader, GLenum type, const GLchar* source
491491
#elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
492492
headersDef = (type == GL_VERTEX_SHADER ?
493493
"#version 100\n precision highp float;\n precision highp int;\n" :
494-
"#version 100\n precision mediump float;\n precision mediump int;\n");
494+
"#version 100\n precision highp float;\n precision highp int;\n");
495495
#elif (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_LINUX && CC_TARGET_PLATFORM != CC_PLATFORM_MAC)
496496
headersDef = (type == GL_VERTEX_SHADER ? "precision highp float;\n precision highp int;\n" : "precision mediump float;\n precision mediump int;\n");
497497
#endif

cocos/renderer/ccShader_PositionTextureColor_noMVP.frag

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
*/
2525

2626
const char* ccPositionTextureColor_noMVP_frag = R"(
27-
#ifdef GL_ES
28-
precision lowp float;
29-
#endif
3027

3128
varying vec4 v_fragmentColor;
3229
varying vec2 v_texCoord;

0 commit comments

Comments
 (0)