How can I pass a string array into a shader?

   3373   3   0
User Avatar
Member
127 posts
Joined: 7月 2005
Offline
Hi,
I've been banging my head against the wall trying to get a way for an arbitrary length array of strings (names of texture files) to be passed into a piece of vex shader code.

However the only thing there seems to be a gui for is the color and float ramp. Having to hardcode the file names in defeats the point.

The only way found is very dirty and involves a file being written from houdini for the vcc pre-processor to read in.

Any better suggestions? Thank you.

Fabian
User Avatar
Member
338 posts
Joined: 9月 2006
Offline
I had the exact same issue. I have requested for an RFE to allow some sort of multiparm setup through vex. i.e We would have a set of parms under a folder which is tagged as a multiparm. Then in a similar fashion to a point cloud we run a while loop on a multiparm handle and this returns the requested data that we can store in an array.

Thus allowing you to create a library of textures or to have unlimited layering in a shader.

I would also like to see array support in vops, which im sure would help in making the multiparm set up more viable.

Cheers
Nick
User Avatar
Member
127 posts
Joined: 7月 2005
Offline
Hi,
thanks for the reply and I guess until that rfe has been implemented it'll just have to be done the dirty way. :twisted:

Fabian
User Avatar
Member
89 posts
Joined: 4月 2008
Offline
And it looks like vex arrays arent exposed in the HDK?

If they were it it should be no problem to write a vexop that could tokenize a list of textures.
  • Quick Links