This article's documentation is for anything that uses the Source engine. Click here for more information.

Cable: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Beginning documentation of the Cable shader)
 
No edit summary
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''<code>Cable</code>''' is the shader used for [[Cables and Ropes|ropes]] such as those created by the <code>[[keyframe_rope]]</code> and <code>[[move_rope]]</code> entities.
{{languageBar}}
{{this is a|pixel shader|name=Cable}} It is used for [[Cables and Ropes|ropes]] such as those created by the {{ent|keyframe_rope|alt=keyframe_rope/move_rope}} entities.
==Parameters==
==Parameters==
;<code>$basetexture <[[texture]]></code>
{{MatParamDef|$basetexture|texture|The [[diffuse]] texture for the rope.<br>Should be very small, usually 16x16 to 64x64.}}
: The texture for the rope. Should be very small, usually 16x16 to 64x64.
{{MatParamDef|$bumpmap|texture|Normal map for the rope.<br>Most of the vanilla materials use {{code|cable/cablenormalmap}}.}}
;<code>[[$bumpmap]] <texture></code>
{{MatParamDef|$vertexcolor|bool|Enables vertex coloring, allowing for more accurate lighting.}}
: Bumpmap for the rope. Default <code>cable/cablenormalmap</code>.
{{MatParamDef|$MinLight|normal|Minimum amount of light received. Default <code>0.1</code>.}}
;<code>[[$vertexcolor]] <[[bool]]></code>
{{MatParamDef|$MaxLight|normal|Maximum amount of light received. Default <code>0.3</code>.}}
: {{Todo|See [[$vertexcolor]]. Default <code>1</code>.}}
{{MatParamDef|$nocull|bool|Disables backface culling. Default <code>1</code>.}}
;<code>$MinLight <[[normal]]></code>
: Minimum amount of light received. Default <code>0.1</code>.
;<code>$MaxLight <normal></code>
: Maximum amount of light received. Default <code>0.3</code>.
;<code>[[$nocull]] <bool></code>
: Disables the backface culling. Default <code>1</code>.


[[Category:Shaders|C]]
==See also==
* [[SplineRope]]
* [[Cables and Ropes]]

Latest revision as of 11:47, 23 August 2025

English (en)Translate (Translate)

Cable is a Pixel shader available in all Source Source games. It is used for ropes such as those created by the keyframe_rope/move_rope entities.

Parameters

The diffuse texture for the rope.
Should be very small, usually 16x16 to 64x64.
Normal map for the rope.
Most of the vanilla materials use cable/cablenormalmap.
Enables vertex coloring, allowing for more accurate lighting.
Minimum amount of light received. Default 0.1.
Maximum amount of light received. Default 0.3.
Disables backface culling. Default 1.

See also