Original Post
Alright I'm thinking about a pine tree vertex shader. The pine tree itself will be basically a cylinder with smaller cylinders that split off from the main trunk and are angled out and downward. The mesh will be oriented such that (0, 0, 0) is at the center of the base of the trunk, which runs up along the y axis. Now since basically I just want to sag the vertices more as they get farther away from (0, 0, 0) (in object space), I shouldn't even need to pass in any extra parameters (except maybe a wind variable, but that's ahead of what i'm thinking about just yet). So my question then is... how to code this (in hlsl, vs1_1 preferably)? How do I determine how much to offset the position.y value... I guess it should be some kind of exponential falloff such that there isn't really much saggage until you get pretty far away from the trunk.