blob: 70cb58885fcbc95f65efce35678fcbfb5d52ef62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
export void simple(uniform float vin[], uniform float vout[],
uniform int count) {
foreach (index = 0 ... count) {
float v = vin[index];
if (v < 3.)
v = v * v;
else
v = sqrt(v);
vout[index] = v;
}
}
|