List of shaderParm variables: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Tels (talk | contribs)
add alpha value
Tels (talk | contribs)
m add some LOD notes
Line 35: Line 35:
|3
|3
|0.00 to 1.00 (or to X.yz)
|0.00 to 1.00 (or to X.yz)
|Alpha value. For textures usually ignored, but used in some LOD materials as the alpha threshold. For foglights: Distance in units beyond which fog is completely opaque (so higher values make fog thinner.) Add as spawnarg shaderParm3 to fog light entity in the editor.
|Alpha value. For textures usually ignored, but used in some LOD materials as the alpha threshold, in this case the engine adjusts the value between 0 and 1.0 at runtime depending on distance to the player. For foglights: Distance in units beyond which fog is completely opaque (so higher values make fog thinner.) Add as spawnarg shaderParm3 to fog light entity in the editor.
|once
|once<br>run-time


|-
|-

Revision as of 06:45, 13 August 2010

Variables named shaderParm0 to shaderParm11 influence the rendering of certain materials. They are either set once in the map editor for some specific entity, or at run-time by various scripts. Inside material definitions, these can be accessed via parm0 ... parm11.

See also the list of global variables.

List of shaderParms

# Value Used by Type
0 0.00 to 1.00 Red value set by _color spawnarg in the editor once
1 0.00 to 1.00 Green value set by _color spawnarg in the editor once
2 0.00 to 1.00 Blue value set by _color spawnarg in the editor once
3 0.00 to 1.00 (or to X.yz) Alpha value. For textures usually ignored, but used in some LOD materials as the alpha threshold, in this case the engine adjusts the value between 0 and 1.0 at runtime depending on distance to the player. For foglights: Distance in units beyond which fog is completely opaque (so higher values make fog thinner.) Add as spawnarg shaderParm3 to fog light entity in the editor. once
run-time
4 0 to 1 set shaderparm4 on flickering lights with a value 0 to 1 to vary the flicker offset so they don't all flicker in sync. ?
5 ? ? ?
6 ? ? ?
7 0..1 (brightness) Used by the moon-light textures in textures/darkmod/sfx/ once
8 ? ? ?
9 ? ? ?
10 ? ? ?
11 0 or 1 non-zero when something is highlighted for frob. This is used by material definitions to make materials "light up" when entities are in the frob-highlight. run-time

See also