2020-08-09 18:39:41 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
var (
|
|
|
|
U0 float
|
|
|
|
U1 float
|
|
|
|
U2 float
|
|
|
|
)
|
|
|
|
|
|
|
|
func Ident(x int) int {
|
|
|
|
return x
|
|
|
|
}
|
|
|
|
|
|
|
|
func Vertex(pos vec2) vec4 {
|
|
|
|
sum := 0
|
|
|
|
for i := 0; i < 10; i++ {
|
|
|
|
x := Ident(i)
|
|
|
|
sum += x
|
|
|
|
for j := 0; j < 10; j++ {
|
|
|
|
x := Ident(j)
|
|
|
|
sum += x
|
|
|
|
}
|
|
|
|
}
|
|
|
|
y := 0
|
|
|
|
sum += y
|
2023-07-27 17:13:40 +02:00
|
|
|
return vec4(float(sum))
|
2020-08-09 18:39:41 +02:00
|
|
|
}
|
2020-08-09 19:29:49 +02:00
|
|
|
|
|
|
|
func Fragment(pos vec4) vec4 {
|
|
|
|
sum := 0
|
|
|
|
for i := 0; i < 10; i++ {
|
|
|
|
x := Ident(i)
|
|
|
|
sum += x
|
|
|
|
for j := 0; j < 10; j++ {
|
|
|
|
x := Ident(j)
|
|
|
|
sum += x
|
|
|
|
}
|
|
|
|
}
|
|
|
|
y := 0
|
|
|
|
sum += y
|
2023-07-27 17:13:40 +02:00
|
|
|
return vec4(float(sum))
|
2020-08-09 19:29:49 +02:00
|
|
|
}
|