.shader

From Jedi Knight Wiki | JKHub
Revision as of 10:02, 5 November 2021 by Tonic (talk | contribs)

.shader files define shaders, which are an important part of the Id Tech 3 graphics system. Shaders are text scripts which can be edited with a text editor. The JK2 SDK also comes with a GUI shader editor called ShaderEd.

In JO and JA, .shader files are located in the shaders subdirectory.

Basically speaking, a shader can be thought of as a dynamic texture. Using shaders, the following kinds of textures can be created:

  • animated textures
  • lit and glowing textures
  • moving/scrolling textures
  • sky textures
  • transparent or semi-transparent textures (eg. grates, glass)
  • grass

Shaders do not only affect the visual appearance of surfaces, but can also change the behaviour of surfaces. So for example, shaders are used to create liquids, and surfaces made out of different kinds of materials (eg. metal, sand, snow).

See also