Files
Ink-Shader-Language/test/pass_and_access_struct_fields_in_functions.shd
2024-06-09 21:34:23 +02:00

14 lines
170 B
Plaintext

Foo :: struct {
some_data : float;
}
foo :: (f : Foo) -> float {
return f.some_data * 2.0;
}
vertex main :: () {
f : Foo;
f.some_data = 4.0;
d : float = foo(f);
}