wedge_parameter根据 wedge_index 和 wedge_index_count 全局变量的值,对输入数据进行线性插值。
wedge_index此节点获取的楔形索引。
wedge_index_count此节点获取的楔形索引数。
start插值输出 value 的起点。
end插值输出 value 的终点。
clamp用于将 value 限制在 start 与 end 之间的特性。
value插值。wedge_index 和 wedge_index_count 全局变量在线性插值中的使用如下所示:
// Let wedge_index be the index of the wedge.
// Let wedge_index_count be the index count of the wedge.
// For wedge_index_count less than or equal to 0, then the returned value is `start`.
// If wedge_index_count is equal to 1, then `t` is wedge_index / 1.
if (wedge_index_count <= 0) {
value = start
}
else {
float t = wedge_index / max(1, wedge_index_count-1)
value = start + t * (end-start)
}