I could use some help with GLSL / BGE python (procedural terrain)

I need help converting this to only emit grass from vertex that whose green channel is over .5

file - https://drive.google.com/file/d/0B_gk_mMFyQnZMzVZWl9WaXBQSFk/view?usp=sharing

script - http://pasteall.org/312664/python

I want to put the system into this ->