mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-23 11:19:40 +00:00
a931366f56
Works for both GLSL and HLSL. Fixes #87.
33 lines
377 B
GLSL
33 lines
377 B
GLSL
#version 450
|
|
|
|
#define IN_SHADER
|
|
|
|
layout(location=0) out vec4 color;
|
|
|
|
void main()
|
|
{
|
|
#if FOO==200
|
|
color = vec4(1.0);
|
|
#else
|
|
#error expected FOO 200
|
|
#endif
|
|
|
|
#ifdef IN_SHADER
|
|
color++;
|
|
#else
|
|
#error IN_SHADER was undef
|
|
#endif
|
|
|
|
#ifdef UNDEFED
|
|
#error UNDEFED defined
|
|
#else
|
|
color *= 3.0;
|
|
#endif
|
|
|
|
#if MUL == 400
|
|
color *= MUL;
|
|
#else
|
|
#error bad MUL
|
|
#endif
|
|
}
|