mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
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;
|
|
}
|