Luminanceof: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added images.)
No edit summary
Line 1: Line 1:
The luminance of the texture is calculated using this formula:
The luminance of the texture is calculated using this formula:
  <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.


[[File:GrimeTextureSource.jpg|thumb|center|200px|Source Color Texture]][[File:GrimeTextureLum.jpg|thumb|center|200px|Result of luminanceof()]]
{|
| [[File:GrimeTextureSource.jpg|thumb|180px|Source Color Texture]] || [[File:GrimeTextureLum.jpg|thumb|180px|Result of luminanceof()]]
|}

Revision as of 16:51, 21 January 2014

The luminance of the texture is calculated using this formula:

dot( texture.rgb, float3( 0.2125, 0.7154, 0.0721 ) )
Source Color Texture
Result of luminanceof()