Two Sided Vex Shader

   5764   1   1
User Avatar
Member
6 posts
Joined: July 2005
Offline
I have a quick question hopefully,

I'm tring to create a double sided shader using VOPS by using the
dot product of the normalized values of the Frontface and N. The float
returned should be between -1 and 1.

Question: How do I enter an if/then statement to express that if the dotprod < 0 use another color.

Thanks,
wood is good
User Avatar
Member
1 posts
Joined: July 2005
Offline
Heres a way to solve the if problem,

Use a Compare VOP with the Dotproduct and a Constant VOP input,
this is then put into a switch VOP along with two VOPs to be used as
front and back shaders.
C.J.Exarhos
  • Quick Links