Jump to content

Vex shader


exarhos2003

Recommended Posts

ran into a stump, in my vex shader It calculates the angle between two vectors for diffuse value. then its divided by the angle to give a value of one. this is just a test use.

So, it displays in the SHOP viewer, but not on the geometry.

Im converting my value(float) to a vector, first input only for red color,then into lighting diffuse, then output(Cf).

any thoughts,

christopher

Link to comment
Share on other sites

At the moment I am biting off more than I can chew with VOPs and getting into the area of the dot product. and things I have found is it returns the a number that if you want the angle you need to put it through the 2 normalised vectors then put it trough the acos to get the angle in radians.

acos( dotp(V1,V2))

convert it to degrees if that is what you need to work with.

Now I am new to this so I may not be rite but it may help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...