Luminanceof: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "The luminance of the texture is calculated using this formula: <code>dot( texture.rgb, float3( 0.2125, 0.7154, 0.0721 ) )</code> The result is a value from 0.0 to 1.0.")
 
(Added images.)
Line 2: Line 2:
  <code>dot( texture.rgb, float3( 0.2125, 0.7154, 0.0721 ) )</code>
  <code>dot( texture.rgb, float3( 0.2125, 0.7154, 0.0721 ) )</code>
The result is a value from 0.0 to 1.0.
The result is a value from 0.0 to 1.0.
[[File:GrimeTextureSource.jpg|thumb|center|200px|Source Color Texture]][[File:GrimeTextureLum.jpg|thumb|center|200px|Result of luminanceof()]]

Revision as of 13:37, 21 January 2014

The luminance of the texture is calculated using this formula:

dot( texture.rgb, float3( 0.2125, 0.7154, 0.0721 ) )

The result is a value from 0.0 to 1.0.

Source Color Texture
Result of luminanceof()