GLSL does not implicitly convert `int` to `float` — mixing them in an expression is a compile error
In GLSL the integer literal 1 and the float literal 1.0 are different types with no implicit conversion. float x = 1; is a compile error — write float x = 1.0;. Mixing them in an expression such as 2.0/3 also fails to compile. This is the single most common typo-class compile error for newcomers, because the same code is legal in C or Python.
Examples
float x = 1; // error — write 1.0
float y = 2.0/3; // error — mixed types
float y = 2.0/3.0; // ok
Assessment
Find the two type errors in float a = 1; float b = 2.0/3; and write corrected code, explaining the rule.