Skip to content

Commit

Permalink
Remove semicolon and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Aug 5, 2020
1 parent e914c5c commit 274542b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Renderer/ShaderSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,16 @@ function combineShader(shaderSource, isFragmentShader, context) {
}

if (isFragmentShader) {
// If high precision isn't support replace occurrences of highp with mediump
// The highp keyword is not always available on older mobile devices
// See https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#In_WebGL_1_highp_float_support_is_optional_in_fragment_shaders
result +=
"\
#ifdef GL_FRAGMENT_PRECISION_HIGH\n\
precision highp float;\n\
#else\n\
precision mediump float;\n\
#define highp mediump;\n\
#define highp mediump\n\
#endif\n\n";
}

Expand Down

0 comments on commit 274542b

Please sign in to comment.