Texture shadows: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page)
 
mNo edit summary
Line 1: Line 1:
[[File:Textureshadows portal2.jpg|thumb|right|Texture shadows in Portal 2]]
[[File:Textureshadows portal2.jpg|thumb|right|Texture shadows in Portal 2]]


Texture shadows allow transparent surfaces to cast baked lightmap shadows.
Texture shadows allow transparent [[model]] surfaces (not brushes or displacements!) to cast baked lightmap shadows.


To enable texture shadows, add <code>[[#Effects|-TextureShadows]]</code> to the VRAD parameters.
To enable texture shadows, add <code>[[#Effects|-TextureShadows]]</code> to the VRAD parameters.

Revision as of 11:39, 24 January 2024

Texture shadows in Portal 2

Texture shadows allow transparent model surfaces (not brushes or displacements!) to cast baked lightmap shadows.

To enable texture shadows, add -TextureShadows to the VRAD parameters.


Models

In QC

Add $casttextureshadows to the model's QC file to enable texture shadows.

Example:

$modelname "props_grate/metal_grate_64.mdl"
$model body "metal_grate_64.smd"
$staticprop

$cdmaterials "metal/"

$surfaceprop "metal"
$contents "grate"

$casttextureshadows

lights.rad

Textureshadows can be enabled on any prop without editing and recompiling the QC through the lights.rad file

Example

forcetextureshadow props_underground/walkway_128a.mdl
forcetextureshadow props_underground/walkway_128b.mdl