File naming convention for GLSL shaders

Vertex, fragment and geometry shader programs can be written in GLSL. These are usually written in separate files. Any filename and extension can be used for GLSL shader files since the language standard does not enforce anything.

I found it convenient to name the shader programs as foo.vs.glsl, foo.fs.glsl and I found this convention used in the source code from the book The OpenGL Superbible. The .glsl is recognized by many editors and GLSL syntax highlighting is automatically applied when you open those files.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s