Merge remote-tracking branch 'refs/remotes/patriciogonzalezvivo/master'

pull/117/head
MITI67 8 years ago
commit 6c46f2482e

@ -22,7 +22,7 @@ Although these simple lines of code don't look like a lot, we can infer substant
6. Float types are vital in shaders, so the level of *precision* is crucial. Lower precision means faster rendering, but at the cost of quality. You can be picky and specify the precision of each variable that uses floating point. In the first line (```precision mediump float;```) we are setting all floats to medium precision. But we can choose to set them to low (```precision lowp float;```) or high (```precision highp float;```).
7. The last, and maybe most important, detail is that GLSL specs dont guarantee that variables will be automatically casted. What does that mean? Manufacturers have different approaches to accelerate graphic card processes but they are forced to guarantee minimum specs. Automatic casting is not one of them. In our “hello world!” example ```vec4``` has floating point precision and for that it expects to be assigned with ```floats```. If you want to make good consistent code and not spend hours debugging white screens, get used to putting the point ( ```.``` ) in your floats. This kind of code will not always work:
7. The last, and maybe most important, detail is that GLSL specs dont guarantee that variables will be automatically casted. What does that mean? Manufacturers have different approaches to accelerate graphics card processes but they are forced to guarantee minimum specs. Automatic casting is not one of them. In our “hello world!” example ```vec4``` has floating point precision and for that it expects to be assigned with ```floats```. If you want to make good consistent code and not spend hours debugging white screens, get used to putting the point ( ```.``` ) in your floats. This kind of code will not always work:
```glsl
void main() {

Loading…
Cancel
Save