1// This is a test file for the Katepart GLSL Syntax Highlighting. 2 3normal text 4// this is a single-line comment 5normal text 6/* this 7is a multi-line 8comment */ 9normal text 10 11some_symbol.some_member; 12some_symbol.some_member_function(); 13some_function(); 14 15// this is a function 16void main() 17{ 18 float f = 1.4e3; // decimal float literal 19 int i1 = 2884; // decimal int literal 20 int i2 = 0x44; // hex int literal 21 int i3 = 0456; // octal int literal 22} 23 24// this is a structure 25struct some_struct 26{ 27 vec3 some_member_vector; 28}; 29 30# this is 31#preprocessor code 32 33// all keywords 34break continue do for while 35if else 36true false 37discard return 38struct 39 40// all basic types 41float int void bool 42mat2 mat3 mat4 43vec2 vec3 vec4 44ivec2 ivec3 ivec4 45bvec2 bvec3 bvec4 46sampler1D sampler2D sampler3D 47samplerCube sampler1DShadow sampler1DShadow 48 49// all type qualifiers 50attribute const uniform varying 51in out inout 52 53// attensions: 54// FIXME 55// TODO 56// BUG 57 58// some of the std functions 59radians degrees sin cos tan asin acos atan 60 61// some of the std variables 62gl_Position gl_PointSize gl_ClipVertex 63 64#version 330 core 65 66// single line comment 67 68/* single line commonet */ 69 70/* 71 multi line comment 72 */ 73 74in ColorFormat { 75 vec3 color; 76} fs_in; 77 78out vec4 fragColor; 79 80vec3 fun(const in vec3 foo) { 81 foo[2] = foo.x; 82 83 return foo; 84} 85 86void main() 87{ 88 fragColor = vec4( fs_in.color, 1.0 ); 89} 90