Announcement

Collapse
No announcement yet.

Vertex Shader

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Vertex Shader

    Hi Folks,

    I want to set up a relatively incomplex vertex shader. My intention is to take a plane with a nice set of square UVs, and I want to pull it's verts down in the middle (consider having a cloth pegged by each of it's four corners, then putting a heavy object in the middle).

    I'm having difficulty setting this up, any pointers?

    Thanks!

    #2
    I'd use vertex colour to multiply the vertex offset part of your material.

    Comment


      #3
      Hmm, that might work. I'll give it a shot but I think I'll run into the same problem - I've been able to set up a proper mask using gradients, but I haven't been able to integrate it into the material.

      Comment


        #4
        Something like this? http://udn.epicgames.com/Three/Mater...ml#WorldNormal

        Comment


          #5
          No, that wouldn't work. I have it now - put a texture coordinate into two cosines, then dot product those cosines with appropriate 2d vectors (I used 0.5, 1 and 1, 0.5). Multiplying them together gives you the spherical mask - take any component out of that mask, shove it in WorldPositionOffset and you're done.

          Edit:

          Comment

          Working...
          X