The simple answer is that the spec does not define a default float precision for fragment shaders, so you have to specify it yourself.
I always thought it was kind of odd that there was no default. Everything else has a default precision. The default could not be highp
, since that's not guaranteed to be available in fragment shaders. But I don't see a good reason why it couldn't be mediump
by default. mediump
is the default for int
, and it could just as well be for float
.
The explanation becomes fairly clear in section 10 ("Issues") of the spec. This section contains various questions that were open while the spec was discussed, and were then answered. There is often some explanation with reasoning why the answer was chosen.
Particularly, "10.3 Precision Qualifiers" deals with this. One of the questions and answers (page 85) is:
Should there be a default precision? It would make sense to specify the default vertex precision as highp as that it what is currently specified. There is no agreement on what the default precision for the fragment side should be.
RESOLUTION: highp for the vertex shader, no default precision for the fragment shader.
I think the key part in this is: "There is no agreement". It sounds like they wanted to define a default precision, but different vendors could not agree on what it should be, and they were so deadlocked that they ended up not defining one at all.