.shader: Difference between revisions

From Jedi Knight Wiki | JKHub
 
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
* sky textures
* sky textures
* transparent or semi-transparent textures (eg. grates, glass, force fields)
* transparent or semi-transparent textures (eg. grates, glass, force fields)
* grass
* vertical textures (eg. 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).
Line 18: Line 18:
'''textures/system/clip''' - creates an invisible clipping surface (blocks player and NPC movement)
'''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/physics_clip''' - creates an invisible clipping surface that also stops weapons and projectiles. Commonly used to give solidness to models.


'''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/do_not_enter''' - blocks [[NPC]] movement, but not players. Used to stop enemies and other AI entering certain areas of the map


'''textures/system/cushion''' - if players fall on to this surface, they will not take fall damage
'''textures/system/cushion''' - if players fall on to this surface, they will not take fall damage
Line 28: Line 28:
'''textures/system/trigger''' - used to create [[Entity#trigger entities|trigger]] entitites
'''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) and "seals" off the map from the void
'''textures/system/caulk''' - a non-drawn surface, but behaves as if it is solid (eg. blocks VIS and light) and "seals" off the map from the void


'''textures/system/weatherzone''' - for creating a weatherzone entity, see [[Weather]]
'''textures/system/weatherzone''' - for creating a weatherzone entity, see [[Weather]]
Line 35: Line 35:


'''textures/system/inside''' - designates an inside area (no weather)
'''textures/system/inside''' - designates an inside area (no weather)
== Materials ==
The following surface materials work in [[Jedi Academy]]. A shader that assigned one of these materials will cause different footstep sound effects to play when the player walks on them, and in some cases [[effect]]s such as puffs of snow, footprints, etc. (These appear to be hardcoded into the game [[Coding|source code]].)
<nowiki>q3map_material Carpet
q3map_material Dirt
q3map_material Gravel
q3map_material HollowMetal
q3map_material LongGrass
q3map_material Mud
q3map_material Sand
q3map_material ShortGrass
q3map_material Snow
q3map_material SolidMetal
q3map_material SolidWood</nowiki>


== See also ==
== See also ==
* [https://icculus.org/gtkradiant/documentation/Q3AShader_Manual/ Quake 3 Shader Manual]
* [https://icculus.org/gtkradiant/documentation/Q3AShader_Manual/ Quake 3 Shader Manual]
* [http://q3map2.robotrenegade.com/docs/shader_manual/contents.html Q3Map2 Shader Manual]


[[Category: File Types]]
[[Category: File Types]]
[[Category: General Modding]]
[[Category: General Modding]]

Latest revision as of 11:47, 11 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)
  • vertical textures (eg. 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[edit]

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 stops weapons and projectiles. Commonly used to give solidness to models.

textures/system/do_not_enter - blocks NPC movement, but not players. Used to stop enemies and other AI 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 VIS and light) and "seals" off the map from the void

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)

Materials[edit]

The following surface materials work in Jedi Academy. A shader that assigned one of these materials will cause different footstep sound effects to play when the player walks on them, and in some cases effects such as puffs of snow, footprints, etc. (These appear to be hardcoded into the game source code.)

q3map_material Carpet
q3map_material Dirt
q3map_material Gravel
q3map_material HollowMetal
q3map_material LongGrass
q3map_material Mud
q3map_material Sand
q3map_material ShortGrass
q3map_material Snow
q3map_material SolidMetal
q3map_material SolidWood

See also[edit]