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

Jul 17, 2012 at 2:11pm

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

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 ?

#34084
Jul 18, 2012 at 1:01pm

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.

#114515
Jul 18, 2012 at 1:22pm

But can we do that wit pix gen stuff ?

Checking mesh.matter in few minutes..

#114516
Jul 18, 2012 at 3:39pm

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

#114517
Jul 18, 2012 at 3:44pm

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.

#114518
Jul 18, 2012 at 3:59pm

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.

#114519
Jul 18, 2012 at 4:03pm

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 :)

#114520

You must be logged in to reply to this topic.