glsl函数之几何函数
length
Calculate the length of a vector
float length(float x)
float length(vec2 x)
float length(vec3 x)
float length(vec4 x)
distance
Calculate the distance between two points
float distance(float p0, float p1)
float distance(vec2 p0, vec2 p1)
float distance(vec3 p0, vec3 p1)
float distance(vec4 p0, vec4 p1)
dot
Calculate the dot product of two vectors
float dot(float x, float y)
float dot(vec2 x, vec2 y)
float dot(vec3 x, vec3 y)
float dot(vec4 x, vec4 y)
Description
dot() returns the dot product of two vectors, x and y. i.e., x[0]⋅y[0]+x[1]⋅y[1]+… If x and y are the same the square root of the dot product is equivalent to the length of the vector. The inp

最低0.47元/天 解锁文章
2016

被折叠的 条评论
为什么被折叠?



