I put together a syntax highlighting file for the UltraEdit editor, to make writing GLSL more colorful:
http://www.mindcontrol.org/~hplus/ultra-edit-glsl.html
Enjoy!
I put together a syntax highlighting file for the UltraEdit editor, to make writing GLSL more colorful:
http://www.mindcontrol.org/~hplus/ultra-edit-glsl.html
Enjoy!
Thanks, That is going to come real handy…
lots of good stuff on your site jon, could do with a few more rants though
That’s good but you could do it for Rendermonkey easily. It’s glsl_keywords.txt in the UserData folder.
It goes something like this, so you can add your keywords to the list.
Keywords : “GLSL Keywords”
{
Color : ( 0, 0, 255 )
Word : “attribute”
“const”
“uniform”
…
}
I’m not going to do that, but feel free to run a perl script or whatever on the file I have for download and mail me the file when you’re done
Why you little devil! OK here it is.
NOTE to RenderMonkey Team, there is an error in the glsl keyword file
maxtrixCompMult should be matrixCompMult! Don’t forget to fix!
PS: I changed the colors to my own liking.
///////////////////////////////////////////////
//
// GLSL Editor Keyword File
//
///////////////////////////////////////////////
//
// Colors
//
Color
{
Comment : ( 0, 128, 0 )
Foreground : ( 0, 0, 0 )
Background : ( 255, 255, 255 )
Highlight : ( 0, 0, 255 )
} // End of Comment
///////////////////////////////////////////////
//
// GLSL Keywords Functions
//
Keywords : "GLSL Keywords"
{
Color : ( 0, 0, 255 )
Word : "attribute"
"const"
"uniform"
"varying"
"break"
"continue"
"do"
"for"
"while"
"if"
"else"
"in"
"out"
"inout"
"float"
"int"
"void"
"bool"
"true"
"false"
"discard"
"return"
"mat2"
"mat3"
"mat4"
"vec2"
"vec3"
"vec4"
"ivec2"
"ivec3"
"ivec4"
"bvec2"
"bvec3"
"bvec4"
"sampler1D"
"sampler2D"
"sampler3D"
"samplerCube"
"sampler1DShadow"
"sampler2DShadow"
"struct"
"volatile"
"using"
"unsigned"
"union"
"typedef"
"this"
"template"
"switch"
"static"
"sizeof"
"short"
"sampler2DRect"
"sampler3DRect"
"sampler3DRectShadow"
"asm"
"cast"
"class"
"default"
"double"
"dvec2"
"dvec3"
"dvec4"
"enum"
"extern"
"external"
"fixed"
"fvec2"
"fvec3"
"fvec4"
"goto"
"half"
"hvec2"
"hvec3"
"hvec4"
"inline"
"input"
"interface"
"long"
"namespace"
"noinline"
"output"
"packed"
"public"
"#section"
"alphaTest"
"always"
"blend"
"color"
"depthTest"
"depthWrite"
"disable"
"dst_alpha"
"dst_color"
"equal"
"gequal"
"greater"
"lequal"
"less"
"never"
"notequal"
"one"
"one_minus_dst_alpha"
"one_minus_src_alpha"
"src_alpha"
"src_color"
"zero"
"#"
"#define"
"#defined"
"#elif"
"#else"
"#endif"
"#error"
"#extension"
"#if"
"#ifdef"
"#ifndef"
"#line"
"#pragma"
"#undef"
"#version"
"__FILE__"
"__LINE__"
"__VERSION__"
"disable"
"enable"
"require"
"warn"
} // End of GLSL Keywords
///////////////////////////////////////////////
//
// Intrinsic Functions
// Original is Color : ( 255, 0, 141 ) but redish-purple is ugly
Keywords : "Intrinsic Functions"
{
Color : ( 0, 0, 130 )
Word :
// Angle and Trigonometry
"radians"
"degrees"
"sin"
"cos"
"tan"
"asin"
"acos"
"atan"
// Exponetial
"pow"
"exp2"
"log2"
"sqrt"
"inversesqrt"
// Common
"abs"
"sign"
"floor"
"ceil"
"fract"
"mod"
"min"
"max"
"clamp"
"mix"
"step"
"smoothstep"
// Geometric
"length"
"distance"
"dot"
"cross"
"normalize"
"ftransform"
"faceforward"
"reflect"
"matrixCompMult"
// Vector
"lessThan"
"lessThanEqual"
"greaterThan"
"greaterThanEqual"
"equal"
"notEqual"
"any"
"all"
"not"
// Texture
"texture1D"
"texture1DProj"
"texture1DLod"
"texture1DProjLod"
"texture2D"
"texture2DProj"
"texture2DLod"
"texture2DProjLod"
"texture3D"
"texture3DProj"
"texture3DLod"
"texture3DProjLod"
"textureCube"
"textureCubeLod"
"shadow1D"
"shadow1DProj"
"shadow1DLod"
"shadow1DProjLod"
"shadow2D"
"shadow2DProj"
"shadow2DLod"
"shadow2DProjLod"
// Fragment
"dFdx"
"dFdy"
"fwidth"
// Noise
"noise1"
"noise2"
"noise3"
"noise4"
} // End of Intrinsic Functions
///////////////////////////////////////////////
//
// Built In Attribute/State
// original is Color : (255, 0, 255) but purple is ugly
Keywords : "Built In"
{
Color : ( 100, 0, 0 )
Word :
"gl_ModelViewMatrix"
"gl_ModelViewMatrixInverse"
"gl_ModelViewMatrixInverseTranspose"
"gl_ModelViewMatrixTranspose"
"gl_ProjectionMatrix"
"gl_ProjectionMatrixInverse"
"gl_ProjectionMatrixInverseTranspose"
"gl_ProjectionMatrixTranspose"
"gl_ModelViewProjectionMatrix"
"gl_ModelViewProjectionMatrixInverse"
"gl_ModelViewProjectionMatrixInverseTranspose"
"gl_ModelViewProjectionMatrixTranspose"
"gl_NormalMatrix"
"gl_TextureMatrix{ range 0..8 }"
"gl_TextureMatrixInverse{ range 0..8 }"
"gl_TextureMatrixInverseTranspose{ range 0..8 }"
"gl_TextureMatrixTranspose{ range 0..8 }"
"gl_NormalScale"
"gl_DepthRange"
"gl_ClipPlane{ range 0..6 }"
"gl_Point"
"gl_PointParameters"
"gl_FrontMaterial"
"gl_BackMaterial"
"gl_LightSource{ range 0..15 }"
"gl_LightModel"
"gl_FrontLightModelProduct"
"gl_BackLightModelProduct"
"gl_FrontLightProduct{ range 0..15 }"
"gl_BackLightProduct{ range 0..15 }"
"gl_TextureEnvColor{ range 0..15 }"
"gl_EyePlaneS{ range 0..15 }"
"gl_EyePlaneT{ range 0..15 }"
"gl_EyePlaneR{ range 0..15 }"
"gl_EyePlaneQ{ range 0..15 }"
"gl_ObjectPlaneS{ range 0..15 }"
"gl_ObjectPlaneT{ range 0..15 }"
"gl_ObjectPlaneR{ range 0..15 }"
"gl_ObjectPlaneQ{ range 0..15 }"
"gl_Fog"
"gl_FogParameters"
"gl_FrontColor"
"gl_BackColor"
"gl_FrontSecondaryColor"
"gl_BackSecondaryColor"
"gl_TexCoord"
"gl_FogFragCoord"
"gl_FragCoord"
"gl_FrontFacing"
"gl_FragColor"
"gl_FragDepth"
"gl_Color"
"gl_SecondaryColor"
"gl_Normal"
"gl_Vertex"
"gl_MultiTexCoord{ range 0..7 }"
"gl_FogCoord"
"gl_Position"
"gl_PointSize"
"gl_ClipVertex"
"gl_DepthRangeParameters"
// Constants
"gl_MaxLights"
"gl_MaxClipPlanes"
"gl_MaxTextureUnits"
"gl_MaxTextureImageUnits"
"gl_MaxTextureCoordARB"
"gl_MaxVertexAttributesGL2"
"gl_MaxVertexUniformFloatsGL2"
"gl_MaxVaryingFloatsGL2"
"gl_MaxVaryingFloats"
"gl_MaxVertexTextureUnitsGL2"
"gl_MaxFragmentTextureUnitsGL2"
"gl_MaxFragmentUniformFloatsGL2"
"gl_MaxFragmentUniformComponents"
"gl_MaxCombinedTextureImageUnits"
"gl_MaxDrawBuffers"
"gl_MaxTextureCoords"
"gl_MaxVertexAttribs"
"gl_MaxVertexTextureImageUnits"
"gl_MaxVertexUniformComponents"
} // End of Buil-In
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.