.FRAG File Extension

.FRAG File Extension

File Type

Fragment Shader File

Developer OpenGL
Popularity
2.0  |  1 Votes
Category Developer Files
Format Text

What is an FRAG file?

A FRAG file contains fragment shader properties in the GL Shading Language (GLSL). It stores a graphics function used to shade a fragment, which represents a pixel in a 3D graphic, with RGB (with Alpha) color, shadows, and other effects data. FRAG files may also be saved as .FSH files.

More Information

GLSL is a high-level shading language with syntax similar to the C programming language. It is utilized by Open Graphics Library (OpenGL), an application programming interface (API) that renders 2D and 3D graphics featured in applications across different platforms. Various applications utilize OpenGL for rendering graphics, including Minecraft, Adobe After Effects, Blender, and Avogadro.

What are shaders?

Shaders give depth to 3D graphics through the alteration of their appearance, which includes defining the levels of color, light, darkness, hue, saturation, and contrast of the graphic. For example, adjusting the angle of light on a surface and the proximity of the light are two examples of how shading can modify the appearance of a graphic.

The shaders run on a computer's graphics processing unit (GPU), which reduces the workload of the computer's central processing unit (CPU). By relieving the CPU of the task of rendering graphics, the CPU can focus its resources on executing application code.

There are two prominent types of GLSL shaders:

  • Vertex - Manipulates a vertex, which is the point of a triangle 3D model mesh where two lines meet; determines the coordinates of a vertex and on a large scale, the placement of graphics on the screen; called once per vertex
  • Fragment - Also known as a texture shader; shades a fragment, which is a pixel in a rasterized triangle that makes up a 3D image; used to process color, shadows, and other effects

How do I open an FRAG file?

You can open FRAG files with the tools included with OpenGL SDK (multiplatform). You can also open and edit FRAG files with source code editors, such as Microsoft Visual Studio Code (multiplatform), and plain text editors, such as Microsoft Notepad (bundled with Windows), Apple TextEdit (bundled with macOS), or gedit (Linux).

NOTE: Plain text editors do not provide helpful editing capabilities like syntax highlighting with source code editors.

Open over 400 file formats with File Viewer Plus.Free Download

Programs that open FRAG files

Updated September 23, 2021

Verified by FileInfo.com

The FileInfo.com team has independently researched the Fragment Shader file format and Mac, Windows, and Linux apps listed on this page. Our goal is 100% accuracy and we only publish information about file types that we have verified.

If you would like to suggest any additions or updates to this page, please let us know.