shader in an inline VOP

   4929   1   1
User Avatar
Member
13 posts
Joined: 7月 2005
Offline
Hi there…

I was trying to get some layered shader functionnality from VOPS…
(yes, I know it's not meant to be used like that, but if it works….)

the idea is to write shaders in plain ol' vex, load tehm in an inline Vop
and then mix and match the results in there…

Trouble is passing attributes to the shader into the inline Vop. it works great with one shader, plugging in parameters vops that have the same name as the shader arguments does work: the shader respond to the vop parameters.

Problems arise when we have more than one copy of the shader in many inline vops, then the parameters name are not unique, and clash..

remapping(/renaming) parameters in the tinline vop doesn't solve the problem

any ideas?

Cheers!

-Charles
User Avatar
スタッフ
4525 posts
Joined: 7月 2005
Offline
I may be misunderstanding what you are trying to do, but I think this is exactly what VOPs were designed to do…

But I would recommend strongly against using the inline VOP to import entire shaders (mostly for the problems you describe). If you bring up the RMB menu on any SHOP, VEX SOP, VEX POP, or whatever, you will see a menu item “Create New VOP Type…”. This will take your vfl code and convert it it into a brand new VOP type with inputs for all the parameters of your shader, and outputs of whatever exported parameters or global variables get modified by the shader. Just give it a try using your favorite SHOP.

You can also do this from the command line, using “vcc -P shader.vfl” will output a dialog script to define a VOP operator type using the code in shader.vfl. There are several related options described in the vcc usage message (“vcc -”). And of course all of this supports OTLs in version 6. Is this what you were trying to do?

Mark
  • Quick Links