$reflectivity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[File:Reflectivity.gif|thumb|Different reflectivity values. Click (twice!) for animation.]]
[[File:Reflectivity.gif|frame|right|Different reflectivity values.]]


'''<code>$reflectivity</code>''' overrides a [[VTF]] file's embedded reflectivity value. It tells [[VRAD]] how much received light should be bounced off the material.
'''<code>$reflectivity</code>''' overrides a [[VTF]] file's embedded reflectivity value. It tells [[VRAD]] how much light should be bounced off the material, without affecting how much it receives.


{{tip|$reflectivity only affects [[VRAD]].}}
{{note|$reflectivity only affects [[static light|static lighting]].}}
{{tip|{{slamminsrc|only}} You can use the <code>-reflectivityScale <[[float]]></code> parameter in [[VRAD]] to scale the light bounced across the whole map. Default is 1.}}


== Usage ==
== Usage ==


To bounce 50% of received light without modifying its shade:
To bounce 50% of received light:


$reflectivity "[.5 .5 .5]"
<source lang=php>$reflectivity "[.5 .5 .5]"</source>
 
The value is a [[material vector]].
 
[[Category:List of Shader Parameters|R]]


The value is a [[material vector]], representing a RGB color value.


== External links ==
== External links ==
* [https://www.youtube.com/watch?v=SMaWXz-gf28 YouTube Video - Source Engine $reflectivity Shader Parameter]
* [http://www.nodraw.net/2011/02/reflectivity Nodraw.net - brief explanation with screenshots of effects]
* [http://www.nodraw.net/2011/02/reflectivity Nodraw.net - brief explanation with screenshots of effects]
[[Category:Shader parameters|r]]

Latest revision as of 12:35, 22 April 2024

Different reflectivity values.

$reflectivity overrides a VTF file's embedded reflectivity value. It tells VRAD how much light should be bounced off the material, without affecting how much it receives.

Note.pngNote:$reflectivity only affects static lighting.
Tip.pngTip:(only in Slammin' Source Map Tools) You can use the -reflectivityScale <float> parameter in VRAD to scale the light bounced across the whole map. Default is 1.

Usage

To bounce 50% of received light:

$reflectivity "[.5 .5 .5]"

The value is a material vector, representing a RGB color value.

External links