Forums > Gen

How to program vertex program part of shader in Gen world ?


Jul 17 2012 | 2:11 pm

I’m (almost) ok to translate glsl fragment program part of shaders to jit.pix/gl.pix.

But how to program vertex program part of shader in Gen world ?

Jul 18 2012 | 1:01 pm

Essentially the same way.
The only difference is that you’re calculating vertexes (i.e. points (and their attributes) in 3D space) in place of fragments (2D pixels).
Have a look at the mesh.shatter example in the examples folder.

Jul 18 2012 | 1:22 pm

But can we do that wit pix gen stuff ?

Checking mesh.matter in few minutes..

Jul 18 2012 | 3:39 pm

You have no access to the vertex program in gl.pix. It’s purely a pixel processing object.

Jul 18 2012 | 3:44 pm

sure.
Wesley, this was the first sense of this thread.
Is there a way to access to the vertex program in the gen world ?
I already checked mesh.matter and indeed, the 2 jit.gen used aren’t related to vertex programming.

Jul 18 2012 | 3:59 pm

if you want to manipule geometry, jit.gen is the way to go. It’s not using a vertex program though. jit.gl.pix is using GLSL for pixel processing, which happens to have a vertex program as well because that’s how GLSL works, but by design it’s not accessible for manipulation. If there’s something you need to do in the vertex program, you will need to do it some other way.

Jul 18 2012 | 4:03 pm

yes okay Wesley
I particularly appreciated how it is explained in the documentation of Gen (and jit.gl.pix and jit.pix)
It is very clear and I learnt a lot.

I’ll use jit.gen and the main cpu which seems to be … very okay :)

Viewing 7 posts - 1 through 7 (of 7 total)

Forums > Gen