Ok,
this should work for most shader (I hope).
This code assume that uniform name is always in the second place of the line,
and that the shader is written without double space.
I hope there's something simpler as i think that this feature is quite useful for shader
newbies like me.
func load_file(file):
var f = File.new()
f.open(file, File.READ)
var index = 1
while not f.eof_reached(): # iterate through all lines until the end of file is reached
var line = f.get_line()
line += " "
#print(line + str(index))
if "uniform" in line:
var l
l = line.split(" ")
print(l[2]) # assume that the shadere is written
# like this: uniform space vartype space varname
index += 1
f.close()
return