Files
wgpu/test-data/glsl_if_preprocessor.vert
João Capucho b91b9ca987 Glsl frontend (#50)
* Basic glsl support

* Miscellaneous fixes and vertex shader works

* Added rudimentary texture and sampler support

* Basic preprocessor

* Added preprocessor if macros

* Pass tests and handle floats correctly

* Fix preprocessor if wrong precedence ordering when using macros
Refractor for the glsl parser
Partial primary expression parser

* Fix all clippy errors

* Cleanup

* Rollback formatting changes in lib.rs
2020-06-09 13:43:16 -04:00

15 lines
216 B
GLSL

#version 460 core
#define TEST 3
#define TEST_EXPR 2 && 2
#if TEST_EXPR - 2 == 0
#error 0
#elif TEST_EXPR - 2 == 1
#error 1
#elif TEST_EXPR - 2 == 2
#error 2
#else
#error You shouldn't do that
#endif