What's the logic for determining a min/max vector in GLSL?
我不知道这件事我感到有些惊讶,但是承认您还在学习中也没有什么害处:)
在GLSL中,根据其文档提供了
return the lesser/greater of two values
但是当值是向量时如何确定呢?显然
在第8.3节"公共函数"顶部的第132页中,引用我所能找到的第一个来源(PDF):
These all operate component-wise. The description is per component.
几乎所有对向量进行运算的函数,但实际上仅对标量有意义才按分量进行运算。 (这包括
因此,例如,