Skip to content

Commit

Permalink
uses the same precision for uniforms (#20107)
Browse files Browse the repository at this point in the history
  • Loading branch information
minggo committed Sep 17, 2019
1 parent e73b7f1 commit 10a0bb1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion cocos/renderer/CCGLProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ bool GLProgram::compileShader(GLuint * shader, GLenum type, const GLchar* source
#elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
headersDef = (type == GL_VERTEX_SHADER ?
"#version 100\n precision highp float;\n precision highp int;\n" :
"#version 100\n precision mediump float;\n precision mediump int;\n");
"#version 100\n precision highp float;\n precision highp int;\n");
#elif (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 && CC_TARGET_PLATFORM != CC_PLATFORM_LINUX && CC_TARGET_PLATFORM != CC_PLATFORM_MAC)
headersDef = (type == GL_VERTEX_SHADER ? "precision highp float;\n precision highp int;\n" : "precision mediump float;\n precision mediump int;\n");
#endif
Expand Down
3 changes: 0 additions & 3 deletions cocos/renderer/ccShader_PositionTextureColor_noMVP.frag
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
*/

const char* ccPositionTextureColor_noMVP_frag = R"(
#ifdef GL_ES
precision lowp float;
#endif

varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
Expand Down

0 comments on commit 10a0bb1

Please sign in to comment.