As per the help “Transitioning between VEX and RSL” there is one page listing 12 mapping values. Is it a case of the simple RSL listed below will render as a mantra shader after its been compiled ?. I suspect of course not . So where can I find out the differences between RSL and the vex for writing shaders ?
ie
surface
constant_test(float Kfb = 1 /* fake brightness */)
{
color surfcolor = 1;
Oi = Os;
Ci = Oi * Cs * surfcolor * Kfb;
}
r
Vex shader writing help ?
4407 3 0- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- Alanw
- Member
- 320 posts
- Joined: Aug. 2007
- Offline
You can check the Globals in VOPs for the basic Globals, but some don't match up like “Pz” and “dPdz” are not present in RSL. In order to get “Pz” in RSL you can do this.
point myPz = depth(P);
pPdz fries my brain, so I'll let somebody else tackle that one.
The code below just needs a few Global changes, and the way you assign variables has to be changed.
ex:
surface
constant_test(float Kd = 1;
vector opac = 1)
{
vector Cd = 1;
Of = opac;
Cf = Cd * Kd;
}
I'm learning RSL myself so I could be wrong, but I think checking VOPS and reading the shader code in SHOP nodes helps on the transition.
point myPz = depth(P);
pPdz fries my brain, so I'll let somebody else tackle that one.
The code below just needs a few Global changes, and the way you assign variables has to be changed.
ex:
surface
constant_test(float Kd = 1;
vector opac = 1)
{
vector Cd = 1;
Of = opac;
Cf = Cd * Kd;
}
I'm learning RSL myself so I could be wrong, but I think checking VOPS and reading the shader code in SHOP nodes helps on the transition.
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
Hey Alan thanks for the reply.I found this in the latest online help
http://www.sidefx.com/docs/houdini9.1/vex/contexts/shading_contexts [sidefx.com] , it should be of some use. If you fancy sharing info let me know
R
http://www.sidefx.com/docs/houdini9.1/vex/contexts/shading_contexts [sidefx.com] , it should be of some use. If you fancy sharing info let me know
R
Gone fishing
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
-
- Quick Links