Tutorial
主要是几个函数的用法
minpos()
vector minpos(geometry, point)
作用:Returns the position of the closest point in the given geometry to the point. 返回给定几何体中距离该点最近的点的位置。
distance()
float distance(vector2 a, vector2 b)
作用:Returns the distance between two points. 返回两点之间的距离
nearpoint()
int nearpoint(geometry, pt)
作用:Finds the closest point in a geometry. 查找几何中最近的点
point()
point(geometry, string attribute_name, int pointnumber)
作用:Reads a point attribute value from a geometry. 从几何体读取点属性值
point(1, "P", @ptnum)
和@opinput_P
Exercise
一点想法: shader可否用这种思路实现水面落雨的效果