mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-12-04 20:53:57 +00:00
d7ca7d43b9
Add support for float, vector and matrices targets. Fix prefix and postfix being inverted (one was returning the value of the other). Remove an unneeded local indirection for prefix handling. Add tests.
19 lines
299 B
GLSL
19 lines
299 B
GLSL
#version 450 core
|
|
|
|
void main() {
|
|
int scalar_target;
|
|
int scalar = 1;
|
|
scalar_target = scalar++;
|
|
scalar_target = --scalar;
|
|
|
|
uvec2 vec_target;
|
|
uvec2 vec = uvec2(1);
|
|
vec_target = vec--;
|
|
vec_target = ++vec;
|
|
|
|
mat4x3 mat_target;
|
|
mat4x3 mat = mat4x3(1);
|
|
mat_target = mat++;
|
|
mat_target = --mat;
|
|
}
|