$cliptotextures

From Valve Developer Community
Jump to: navigation, search

The QC command $cliptotextures instructs the compiler to clamp all vertex texture co-ordinates to the range [0 1]. This will distort the texture projection for any triangles whose vertices contain values outside this range, so is usually not required unless you have a specific reason to use it.

If $cliptotextures is not specified, the compiler will leave the texture co-ordinates at their original values (or optimised equivalents). Under normal circumstances, texture co-ordinates outside the [0 1] range will simply wrap around the texture image, meaning they will look identical to co-ordinates within the [0 1] range.

3D artists occasionally make use of this wrapping behaviour in the UV mapping step of creating a model. If multiple sections of a model need to make use of the same area of the underlying texture, placing vertices over each other at the same co-ordinates can be more difficult to work with in the modeling software. Placing vertices at higher or lower multiples of these co-ordinates can allow the artist to visually separate the vertices in the modeling software, and have these vertices map back to the same area of the texture when the model is compiled. In this case, $cliptotextures would not be used when compiling the model, as the out-of-range texture co-ordinates would be clamped to values that the artist did not intend.

Syntax

$cliptotextures ;

See also

Empty

This article or section is empty. You can help by adding it.

External links