SRGB: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
	 
	
 Note:The
Note:The  Xbox 360 will always use hardware conversion.
 Xbox 360 will always use hardware conversion.
		
	
| Grande1900 (talk | contribs) No edit summary | Grande1900 (talk | contribs)   (add example) | ||
| Line 1: | Line 1: | ||
| {{Orphan|date=November 2024}} | |||
| {{Orphan|date= | |||
| }} | |||
| {{DISPLAYTITLE:sRGB}} | {{DISPLAYTITLE:sRGB}} | ||
| Line 14: | Line 11: | ||
| [[File:SRGB-compare.jpg|right|Xbox 360 vs. PC colour space comparison]] | [[File:SRGB-compare.jpg|right|Xbox 360 vs. PC colour space comparison]] | ||
| The {{mono|r_shader_srgb}} [[ConVar]] determines whether sRGB conversion is done through hardware or through software.  | The {{mono|r_shader_srgb}} [[ConVar]] determines whether sRGB conversion is done through hardware or through software. | ||
| * -1: Use hardware cap{{clarify}} | * -1: Use hardware cap{{clarify}} | ||
| * 0: Use hardware sRGB conversion (Default) | * 0: Use hardware sRGB conversion (Default) | ||
| * 1: Use software sRGB conversion | * 1: Use software sRGB conversion | ||
| {{Note|The {{360|2}} will always use hardware conversion.}} | |||
| There is also a [[Material_optimization#Conditional_Fallbacks|fallback shader]] ({{mono|srgb}}) that can be used in [[VMT]]s to detect whether or not conversion is actually being done through hardware. | There is also a [[Material_optimization#Conditional_Fallbacks|fallback shader]] ({{mono|srgb}}) that can be used in [[VMT]]s to detect whether or not conversion is actually being done through hardware. | ||
| {{Expand| | |||
| <br>{{path|hl2\materials\dev\dev_combinemonitor_3.vmt}} | |||
|  "Unlittwotexture" | |||
|  //"UnlitGeneric" | |||
|  { | |||
|  	"$basetexture" "_rt_Camera" | |||
|  	"%tooltexture" "dev/dev_monitor" | |||
|  	"$surfaceprop" "glass" | |||
|  	"$additive" "1" | |||
|  //	"$texture2"	"models/props_combine/shieldwall_tint" | |||
|  	"$texture2"	"dev/dev_combinescanline" | |||
|  //	"$texture2"	"engine/camerarendertarget" | |||
|  	//"'''srgb'''?$alpha" "1.3" | |||
|  	"'''srgb'''?$color2" "[2.5 2.5 2.5]" | |||
|  	"Proxies" | |||
|  	{ | |||
|  		"Sine" | |||
|  		{ | |||
|  			"resultVar" "$color[0]" | |||
|  			"sineperiod" .1 | |||
|  			"sinemin" .4 | |||
|  			"sinemax" .41 | |||
|  		} | |||
|  		"Sine" | |||
|  		{ | |||
|  			"resultVar" "$color[1]" | |||
|  			"sineperiod" .1 | |||
|  			"sinemin" .4 | |||
|  			"sinemax" .41 | |||
|   		} | |||
|  		"Sine" | |||
|  		{ | |||
|  			"resultVar" "$color[2]" | |||
|  			"sineperiod" .1 | |||
|  			"sinemin" .4 | |||
|  			"sinemax" .41  | |||
|  		}  | |||
|  		"TextureScroll" | |||
|  		{ | |||
|  			"texturescrollvar" "$texture2transform" | |||
|  			"texturescrollrate" .06 | |||
|  			"texturescrollangle" -90 | |||
|  		} | |||
|  	} | |||
|  } | |||
| |title=Example}} | |||
| == See Also == | == See Also == | ||
| * {{WP|sRGB}} | * {{WP|sRGB}} | ||
| [[Category:Glossary]] | [[Category:Glossary]] | ||
Revision as of 18:12, 25 November 2024

This article is an orphan, meaning that few or no articles link to it.
You can help by adding links to this article from other relevant articles.
 adding links to this article from other relevant articles.  
November 2024
You can help by
 adding links to this article from other relevant articles.
 adding links to this article from other relevant articles.  November 2024
sRGB is a standardized color space for use with monitors, printers, and the internet. It is supported by OpenGL and Direct3D.
Source
The r_shader_srgb ConVar determines whether sRGB conversion is done through hardware or through software.
- -1: Use hardware cap[Clarify]
- 0: Use hardware sRGB conversion (Default)
- 1: Use software sRGB conversion
 Note:The
Note:The  Xbox 360 will always use hardware conversion.
 Xbox 360 will always use hardware conversion.There is also a fallback shader (srgb) that can be used in VMTs to detect whether or not conversion is actually being done through hardware.
| 
 "Unlittwotexture"
//"UnlitGeneric"
{
	"$basetexture" "_rt_Camera"
	"%tooltexture" "dev/dev_monitor"
	"$surfaceprop" "glass"
	"$additive" "1"
//	"$texture2"	"models/props_combine/shieldwall_tint"
	"$texture2"	"dev/dev_combinescanline"
//	"$texture2"	"engine/camerarendertarget"
	//"srgb?$alpha" "1.3"
	"srgb?$color2" "[2.5 2.5 2.5]"
	"Proxies"
	{
		"Sine"
		{
			"resultVar" "$color[0]"
			"sineperiod" .1
			"sinemin" .4
			"sinemax" .41
		}
		"Sine"
		{
			"resultVar" "$color[1]"
			"sineperiod" .1
			"sinemin" .4
			"sinemax" .41
 		}
		"Sine"
		{
			"resultVar" "$color[2]"
			"sineperiod" .1
			"sinemin" .4
			"sinemax" .41 
		} 
		"TextureScroll"
		{
			"texturescrollvar" "$texture2transform"
			"texturescrollrate" .06
			"texturescrollangle" -90
		}
	}
}
 | 

