another vertex_attribute shader example
Here's another example of a shader using vertex attributes. A matrix
generated by jit.bfg manipulates the geometry and the colour of the primitve
in jit.gl.mesh on the GPU.
pelado
great patch!
thanks for sharing.
wow it's beautiful,
thank you for sharing
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
> 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
great! in a project i'm creating similar complex gradient patterns. i had to use gradient images drawn in illustrator as masks for blending with slabs. next step was going to be working out how to generate the masking gradient patterns in max. guess i ve got my answer right there!
i need to learn coding shaders asap...
hi. pelado's website seems to no longer exist.
Does anyone have p.jit.gl externals as a zip file that they could email to me please?
I was searching about Mesh and found this old thread, does anyone have Pelado's vertex_attribute shader ? That one seems particularly interesting !
@AgentSpock, I have the p.jit.gl.shader and p.jit.gl.tools_package if you are still interested.