if you think of the Vec2 as TWO boxes
then p has TWO boxes that you must always put something in.
Also the results of a formula, must have a Box for each of it's results.
lets look at this example
vec2 p = -1.0 + 2.0 * q;
p.x *= iResolution.xy/iResolution.y;
the 1st line vec2 p =
this assigns TWO boxes to p
so p by itself needs to have TWO boxes filled.
in the second line p.x =
here we are using a swizzle to put something in JUST ONE of the BOXES, the BOX called x
But on the other side of the = the formula produces TWO results, So we need to have TWO boxes to hold the results.
this
iResolution.xy/iResolution.y
it is Taking the TWO boxes of iResolution.xy or BOX iResolution.x and BOX iResolution.y
and dividing them by the same box iResolution.y
is a shorter way of
doing this
(iResolution.x/iResolution.y , iResolution.y/iResolution.y)
the results is TWO boxes
but on the front side of the =
there was only ONE BOX to hold the results.
that is what is Meant by you can't convert from a Vec2 float ( 2 Boxes ) to a float (a single BOX)
the Number of BOXES on both sides of the = must be the same.
Now there are several ways to fix the error, and you have to try them to see if it gives the desired results.
you could change line 115 to
p *= iResolution.xy/iResolution.y;
the p alone has 2 BOXES and the formula produces a TWO BOX result.
or
p *= iResolution.xy/iResolution.yx;
again, both side have 2 BOXES
or
p.xy *= iResolution.xy/iResolution.y;
and Again, Both Sides have two BOXES
or
p.x *= iResolution.x/iResolution.y;
this one is different
both sides have only ONE BOX, but Both sides still have the same number of BOXES
a vec3 has 3 BOXES so both sides of the = must have 3 BOXES
a vec4 has 4 BOXES so both sides of the = must have 4 BOXES
The first, second, third, and fourth BOXES can be referred to by using the Swizzle letters
xyzw where x = BOX1, y=BOX2, z=BOX3, w=BOX4
rgba where r = BOX1, g=BOX2, b=BOX3, a=BOX4
stpq where s = BOX1, t=BOX2, p=BOX3, q=BOX4
you can jumble the order of the letter, but the letters are fixed to which BOX they represent.
x is always BOX 1
g is always BOX 2
z is always BOX 3