how to use a SOP attribute in displacement shader?
3688
5
0
-
- flyingc
- 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
-
- eetu
- 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)
-
- flyingc
- Member
- 160 posts
- Joined:
- Offline
thank you.
but i want to write a vex displace shader .
not in vop network.
-
- eetu
- 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.
i guess adding this parameter as input variable to the vex function should do the trick
myVexFunction( float myVar
{
}
whoops to late
-
- flyingc
- 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!