mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
shader: Use the loop counters in the test
This commit is contained in:
parent
2ca551cdc6
commit
c02213e900
4
internal/shader/testdata/for.expected.vs
vendored
4
internal/shader/testdata/for.expected.vs
vendored
@ -3,11 +3,11 @@ void F0(out vec2 l0) {
|
||||
vec2 l3 = vec2(0);
|
||||
l1 = vec2(0.0);
|
||||
for (int l2 = 0; l2 < 100; l2++) {
|
||||
(l1).x = ((l1).x) + (1);
|
||||
(l1).x = ((l1).x) + (l2);
|
||||
}
|
||||
l3 = vec2(0.0);
|
||||
for (float l4 = 10.0; l4 >= 0.0; l4 -= 2.0) {
|
||||
(l3).x = ((l3).x) - (1);
|
||||
(l3).x = ((l3).x) + (l4);
|
||||
}
|
||||
l0 = l1;
|
||||
return;
|
||||
|
4
internal/shader/testdata/for.go
vendored
4
internal/shader/testdata/for.go
vendored
@ -3,11 +3,11 @@ package main
|
||||
func Foo() vec2 {
|
||||
v := vec2(0)
|
||||
for i := 0; i < 100; i++ {
|
||||
v.x++
|
||||
v.x += i
|
||||
}
|
||||
v2 := vec2(0)
|
||||
for i := 10.0; i >= 0; i -= 2 {
|
||||
v2.x--
|
||||
v2.x += i
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user