> I was just experimenting with creating geometry with this BFG + gridshape
> method, this is a cool shader to use with it. Im not sure if I understand
> the use of the morph parameter, it seems to do the same thing as the weight
> parameter of the BFG, is this true?
>
> Very cool shader, good work
>

Taking a look at the shader jxs file you'll see the following line:

vec4 pos = mix(gl_Vertex, ATTR_vertex , morph);

- gl_Vertex is a GLSL attribute that takes the values declared by
openGL. In this example, it is the matrix that is passed from
jit.gl.gridshape to the left input of jit.gl.mesh.
- ATTR_Vertex is the vertex attribute passed to jit.gl.mesh and is the
matrix generated by jit.bfg.
- morph is the variable that returns the mix (a linear blend) between
these two matrices.

Give morph a value of 0. and the resultant matrix will be that described by
the vertex matrix of jit.gl.mesh (which is in fact the matrix output by
jit.gl.gridshape). With a value of 1. the matrix will be the same as that
generated by jit.bfg. Hope that helps to describe what is going on in the
shader.

The weight attribute in jit.bfg is a scaling factor for the matrix that it
generates

Thanks to Georg Bosch the example file is now also available in Max 4
format.

pelado