mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
shader: Add more tests
This commit is contained in:
parent
f39c591252
commit
d04fdbde61
7
internal/shader/testdata/assign.expected.vs
vendored
Normal file
7
internal/shader/testdata/assign.expected.vs
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
void F0(in vec2 l0, out vec4 l1) {
|
||||
float l2 = 0.0;
|
||||
l2 = 0.000000000e+00;
|
||||
l2 = (l2) + (1.000000000e+00);
|
||||
l1 = vec4(l0, l2, l2);
|
||||
return;
|
||||
}
|
8
internal/shader/testdata/assign.go
vendored
Normal file
8
internal/shader/testdata/assign.go
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
package main
|
||||
|
||||
func Foo(foo vec2) vec4 {
|
||||
var r1 float
|
||||
r1 = 0.0
|
||||
r1 += 1.0
|
||||
return vec4(foo, r1, r1)
|
||||
}
|
@ -6,7 +6,7 @@ void F0(in vec2 l0, out vec4 l1) {
|
||||
F1(l4, l5);
|
||||
l2 = l4;
|
||||
l3 = l5;
|
||||
l1 = vec4(l0, l2, l2);
|
||||
l1 = vec4(l0, l2, l3);
|
||||
return;
|
||||
}
|
||||
|
||||
|
2
internal/shader/testdata/assign_multiple.go
vendored
2
internal/shader/testdata/assign_multiple.go
vendored
@ -3,7 +3,7 @@ package main
|
||||
func Foo(foo vec2) vec4 {
|
||||
var r1, r2 float
|
||||
r1, r2 = Bar()
|
||||
return vec4(foo, r1, r1)
|
||||
return vec4(foo, r1, r2)
|
||||
}
|
||||
|
||||
func Bar() (float, float) {
|
||||
|
6
internal/shader/testdata/define_type.expected.vs
vendored
Normal file
6
internal/shader/testdata/define_type.expected.vs
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
void F0(in vec2 l0, out vec4 l1) {
|
||||
vec4 l2 = vec4(0.0);
|
||||
l2 = (vec4(0.000000000e+00)) * (vec4(0.000000000e+00));
|
||||
l1 = l2;
|
||||
return;
|
||||
}
|
6
internal/shader/testdata/define_type.go
vendored
Normal file
6
internal/shader/testdata/define_type.go
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
package main
|
||||
|
||||
func Foo(foo vec2) vec4 {
|
||||
r := vec4(0.0) * vec4(0.0)
|
||||
return r
|
||||
}
|
Loading…
Reference in New Issue
Block a user