how to use a SOP attribute in displacement shader?

   3688   5   0
User Avatar
Member
160 posts
Joined:
Offline
hi
I customize an attribute,such as xx, in Sop.
how to use the attribute in vex displace shader?
thanks
User Avatar
Member
606 posts
Joined: 5月 2007
Offline
Use a Parameter VOP, with the parameter name set to the attribute you wish to import.

eetu.

Attachments:
attrib_displace.hip (477.1 KB)

User Avatar
Member
160 posts
Joined:
Offline
thank you.
but i want to write a vex displace shader .
not in vop network.
User Avatar
Member
606 posts
Joined: 5月 2007
Offline
Oh, I see.

I've never written one, but looking at the “View VEX Code” from the above VOPnet, seems like if you just do

displace myDisplace(…, float xx = 1)

it will import the attribute (with a default of 1)

eetu.
User Avatar
Member
229 posts
Joined: 5月 2006
Offline
i guess adding this parameter as input variable to the vex function should do the trick

myVexFunction( float myVar
{


}

whoops to late
User Avatar
Member
160 posts
Joined:
Offline
eetu
Oh, I see.

I've never written one, but looking at the “View VEX Code” from the above VOPnet, seems like if you just do

displace myDisplace(…, float xx = 1)

it will import the attribute (with a default of 1)

eetu.

thank u ,i try it ,it works!
  • Quick Links