.shader: Difference between revisions

From Jedi Knight Wiki | JKHub
mNo edit summary
(system shaders)
Line 8: Line 8:
* moving/scrolling textures
* moving/scrolling textures
* sky textures
* sky textures
* transparent or semi-transparent textures (eg. grates, glass)
* transparent or semi-transparent textures (eg. grates, glass, force fields)
* grass
* 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).
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).
== System shaders ==
System shaders are special shaders which affect game rendering and gameplay. Some of these are described below. Further information about system shaders can be found [https://icculus.org/gtkradiant/documentation/q3radiant_manual/ch07/pg7_1.htm#texman here].
'''textures/system/clip''' - creates an invisible clipping surface (blocks player and NPC movement)
'''textures/system/physics_clip''' - creates an invisible clipping surface that also affects weapons and projectiles
'''textures/system/do_not_enter''' - blocks NPC movement, but not the player. Used to stop enemies and other NPCs entering certain areas of the map
'''textures/system/cushion''' - if players fall on to this surface, they will not take fall damage
'''textures/system/origin''' - used to set the origin of func_rotating, func_train and func_static entities
'''textures/system/trigger''' - used to create [[Entity#trigger entities|trigger]] entitites
'''textures/system/caulk''' - a non-drawn surface, but behaves as if it is solid (eg. blocks light)
'''textures/system/weatherzone''' - for creating a weatherzone entity, see [[Weather]]
'''textures/system/outside''' - designates an outside area for weather
'''textures/system/inside''' - designates an inside area (no weather)


== See also ==
== See also ==

Revision as of 08:18, 7 November 2021

.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, force fields)
  • 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).

System shaders

System shaders are special shaders which affect game rendering and gameplay. Some of these are described below. Further information about system shaders can be found here.

textures/system/clip - creates an invisible clipping surface (blocks player and NPC movement)

textures/system/physics_clip - creates an invisible clipping surface that also affects weapons and projectiles

textures/system/do_not_enter - blocks NPC movement, but not the player. Used to stop enemies and other NPCs entering certain areas of the map

textures/system/cushion - if players fall on to this surface, they will not take fall damage

textures/system/origin - used to set the origin of func_rotating, func_train and func_static entities

textures/system/trigger - used to create trigger entitites

textures/system/caulk - a non-drawn surface, but behaves as if it is solid (eg. blocks light)

textures/system/weatherzone - for creating a weatherzone entity, see Weather

textures/system/outside - designates an outside area for weather

textures/system/inside - designates an inside area (no weather)

See also