mirror of
https://github.com/KhronosGroup/glslang
synced 2024-09-20 12:49:56 +00:00
52ac67e913
Also, improved error reporting in general for the PP. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21417 e7fa87d3-cd2b-0410-9028-fcbf551c1848
71 lines
689 B
GLSL
71 lines
689 B
GLSL
#version 110
|
|
|
|
#define ON
|
|
|
|
float sum = 0.0;
|
|
|
|
void main()
|
|
{
|
|
|
|
#ifdef ON
|
|
//yes
|
|
sum += 1.0;
|
|
#endif
|
|
|
|
#ifdef OFF
|
|
//no
|
|
sum += 20.0;
|
|
#endif
|
|
|
|
#if defined(ON)
|
|
//yes
|
|
sum += 300.0;
|
|
#endif
|
|
|
|
#if defined(OFF)
|
|
//no
|
|
sum += 4000.0;
|
|
#endif
|
|
|
|
#if !defined(ON)
|
|
//no
|
|
sum += 50000.0;
|
|
#endif
|
|
|
|
#ifndef OFF
|
|
//yes
|
|
sum += 600000.0;
|
|
#else
|
|
//no
|
|
sum += 0.6;
|
|
#endif
|
|
|
|
#if defined(ON) && defined(OFF)
|
|
//no
|
|
sum += 0.7;
|
|
#elif !defined(OFF)
|
|
//yes
|
|
sum += 7000000.0;
|
|
#endif
|
|
|
|
#if defined(ON) && !defined(OFF)
|
|
//yes
|
|
sum += 80000000.0;
|
|
#endif
|
|
|
|
#if defined(OFF) || defined(ON)
|
|
//yes
|
|
sum += 900000000.0;
|
|
#endif
|
|
|
|
#if NEVER_DEFINED
|
|
//no
|
|
sum += 0.04;
|
|
#else
|
|
sum += 0.05;
|
|
#endif
|
|
|
|
// sum should be 987600301.7
|
|
gl_Position = vec4(sum);
|
|
}
|