This is a tutorial for games that do not support $treeSway.
$treeSway is a VMT texture parameter that allows trees and such to appear to sway from the wind. However this is not supported on older games such as CS:S, HL2 etc.
It actually exists in GMod but flickers when lit by flashlight
So here's how to achieve similar effect without $treeSway:It won't actually bend the trees, but works as good for slight wind swaying.
-Find what texture the leaves of the trees use, and open the VMT.
-Next, add these proxies to it
"$translate" "[0 0]"
You can scale the sineperiod values for slower/faster movement.
If you see unexpected results, you'll need to tweak the sinemin and sinemax parameters.
That's because these values were typed in for a specific tree, and since we generally dont know what the UV map of each tree looks like, the values might need some adjusting.
I don't know if a whole forest of trees with this will make it lag, but this effect costs virtually no fps if you see a small number of trees with this, at once (in the PVS).