La información en este artículo es para Source. Haga clic aquí para más información.

Es/$phong: Difference between revisions

From Valve Developer Community
< Es
Jump to navigation Jump to search
m (Multipage removal)
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{this is a|shader parameter|name=$phong|since=Source 2006|shader=VertexLitGeneric}}  
{{todo|Arreglar plantilla para corregir el texto en esta página.}}
{{this is a|shader parameter|name=$phong|since=Source 2006|shader=VertexLitGeneric}}
[[File:Alyx phong closeup.jpg|thumb|200px|Sombreado phong en la piel, el pelo y los labios de Alyx.]]
[[File:Alyx phong closeup.jpg|thumb|200px|Sombreado phong en la piel, el pelo y los labios de Alyx.]]
También está disponible en sombreado {{shader Name|LightmappedGeneric}} y {{Shader Name|WorldVertexTransition}} en todos los juegos desde {{csgo|4}}. proporcionando [https://es.wikipedia.org/wiki/Reflexi%C3%B3n_difusa reflexión difusa] a baja intensidad y [https://es.wikipedia.org/wiki/Resaltado_especular resaltado especular], enmascarados con una textura que controla su intensidad mediante téxeles. Para una explicación completa, véase {{L|Phong materials|materiales phong}}.
También está disponible en sombreado {{shader Name|LightmappedGeneric}} y {{Shader Name|WorldVertexTransition}} en todos los juegos desde {{csgo|4}}. proporcionando [https://es.wikipedia.org/wiki/Reflexi%C3%B3n_difusa reflexión difusa] a baja intensidad y [https://es.wikipedia.org/wiki/Resaltado_especular resaltado especular], enmascarados con una textura que controla su intensidad mediante téxeles. Para una explicación completa, véase {{L|Phong materials|materiales phong}}.
{{Note|El sombreado phong <code>LightmappedGeneric</code> y <code>WorldVertexTransition</code> solo está disponible en {{csgobranch|4}}. Es necesario que la luz solar ilumine el material de una entidad {{ent|env_cascade_light}} para que funcione adecuadamente y usa sombras dinámicas generadas como máscara sobre las máscaras de sombreado tradicional ({{Strata|since}} {{ent|env_projectedtexture|4}} también afecta a los sólidos con sombreado phong activado)}}.
{{Note|El sombreado phong <code>LightmappedGeneric</code> y <code>WorldVertexTransition</code> solo está disponible en {{csgobranch|4}}. Es necesario que la luz solar ilumine el material de una entidad {{ent|env_cascade_light}} para que funcione adecuadamente y usa sombras dinámicas generadas como máscara sobre las máscaras de sombreado tradicional ({{Strata|since}} {{ent|env_projectedtexture|4}} también afecta a los sólidos con sombreado phong activado)}}
{{Note|El sombreado phong para <code>LightmappedGeneric</code> también está disponible en {{mapbase|4}}, pero se implementa distinto.}}
{{Note|El sombreado phong para <code>LightmappedGeneric</code> también está disponible en {{mapbase|4}}, pero se implementa distinto.}}
{{important|En {{bms|4}} el reflejo de Lambert para {{L|NewLight Point|nuevas iluminaciones}} no funciona. Por tanto las mallas con {{L|$phong}} o {{L|$halflambert}} reciben luz de TODOS lados perpendicularmente. Si quieres usar {{L|$phong}} o {{L|$halflambert}} puedes corregir esto añadiendo para el material {{L|VMT}} el parámetro <code>"$halflambert_gbuffer_off"    "1"</code>.}}


==Sintaxis==
==Sintaxis==
Line 33: Line 33:
* '''If''' {{ent|$normalmapalphaenvmapmask}} is used, the {{ent|$bumpmap}}'s alpha channel will be used for Phong masking. Using either <code>$basemapalphaphongmask</code> or <code>$basemapluminancephongmask</code> will override it.
* '''If''' {{ent|$normalmapalphaenvmapmask}} is used, the {{ent|$bumpmap}}'s alpha channel will be used for Phong masking. Using either <code>$basemapalphaphongmask</code> or <code>$basemapluminancephongmask</code> will override it.
<br>
<br>
{{MatParam|$bumpmap|texture|Phong requires mask. The {{L|alpha channel}} of a {{L|$bumpmap|bump map}} acts as a Phong mask by default.}}
{{MatParamDef|$bumpmap|texture|Phong requires mask. The {{L|alpha channel}} of a {{L|$bumpmap|bump map}} acts as a Phong mask by default.}}
{{MatParam|$basemapalphaphongmask|bool|Use {{ent|$basetexture}}'s {{L|alpha channel}} as the Phong mask instead of <code>$bumpmap</code>'s {{L|alpha channel}}.
{{MatParamDef|$basemapalphaphongmask|bool|Use {{ent|$basetexture}}'s {{L|alpha channel}} as the Phong mask instead of <code>$bumpmap</code>'s {{L|alpha channel}}.
{{warning|Using this with {{ent|$normalmapalphaenvmapmask}} will override the mask used for {{ent|$envmap}} to be the contents of the {{ent|$basetexture}}'s alpha channel!}}
{{warning|Using this with {{ent|$normalmapalphaenvmapmask}} will override the mask used for {{ent|$envmap}} to be the contents of the {{ent|$basetexture}}'s alpha channel!}}
{{warning|{{gmod|4}} Using this with {{ent|$normalmapalphaenvmapmask}} and {{ent|$envmap}} renders in {{ent|$envmap}} and '''<code>$phong</code>''' be masked by both '''<code>$basemapalphaphongmask</code>''' alpha channel and {{ent|$normalmapalphaenvmapmask}} alpha channel.}} |since={{src07}}|shaders=VertexLitGeneric}}
{{warning|{{gmod|4}} Using this with {{ent|$normalmapalphaenvmapmask}} and {{ent|$envmap}} renders in {{ent|$envmap}} and '''<code>$phong</code>''' be masked by both '''<code>$basemapalphaphongmask</code>''' alpha channel and {{ent|$normalmapalphaenvmapmask}} alpha channel.}} |since={{src07}}|shaders=VertexLitGeneric}}
{{MatParam|$basemapluminancephongmask|bool|Mask phong intensity based on the brightness of the <code>$basetexture</code>.
{{MatParamDef|$basemapluminancephongmask|bool|Mask phong intensity based on the brightness of the <code>$basetexture</code>.
{{bug|Basetexture Luminance will replace the mask used for {{ent|$envmap}}, '''if''' {{ent|$normalmapalphaenvmapmask}} is used.}}
{{bug|Basetexture Luminance will replace the mask used for {{ent|$envmap}}, '''if''' {{ent|$normalmapalphaenvmapmask}} is used.}}
{{bug|Doesn't work in {{gmod|4}}.}}
{{bug|Doesn't work in {{gmod|4}}.}}
|not={{gmod}}|since={{l4d}}|shaders=VertexLitGeneric}}
|not={{gmod}}|since={{l4d}}|shaders=VertexLitGeneric}}
{{MatParam|$phongexponent|and=$phongexponent2|int|A global [[Phong materials#Phong mask and exponent texture|exponent]] value. Overrides an exponent mask if present.
{{MatParamDef|$phongexponent|and=$phongexponent2|int|A global [[Phong materials#Phong mask and exponent texture|exponent]] value. Overrides an exponent mask if present.
: <code>$phongexponent2</code> is for <code>WorldVertexTransition</code>'s second material in {{csgobranch|4}}.}}
: <code>$phongexponent2</code> is for <code>WorldVertexTransition</code>'s second material in {{csgobranch|4}}.}}
{{MatParam|$phongexponenttexture|texture|A per-texel exponent map. In an exponent map:
{{MatParamDef|$phongexponenttexture|texture|A per-texel exponent map. In an exponent map:
:* '''Red channel:''' Exponent mask (size of highlight, 0-255, where a value of 0 is a large highlight, 255 small.)
:* '''Red channel:''' Exponent mask (size of highlight, 0-255, where a value of 0 is a large highlight, 255 small.)
:* '''Green channel:''' Albedo tint mask (only if <code>$phongalbedotint 1</code>, 0-255, where a value of 0 is no tint, 255 full tint.)
:* '''Green channel:''' Albedo tint mask (only if <code>$phongalbedotint 1</code>, 0-255, where a value of 0 is no tint, 255 full tint.)
Line 49: Line 49:
:* '''Alpha channel:''' {{ent|$rimlight}} mask (only if '''<code>$rimmask 1</code>'''.)
:* '''Alpha channel:''' {{ent|$rimlight}} mask (only if '''<code>$rimmask 1</code>'''.)
:{{Note|<code>LightmappedGeneric</code> and <code>WorldVertexTransition</code> do not have support for <code>$phongexponenttexture</code>. You must use <code>$phongexponent</code> instead.}}|shaders=VertexLitGeneric}}
:{{Note|<code>LightmappedGeneric</code> and <code>WorldVertexTransition</code> do not have support for <code>$phongexponenttexture</code>. You must use <code>$phongexponent</code> instead.}}|shaders=VertexLitGeneric}}
{{MatParam|$phongexponentfactor|float|Multiply the exponent from the <code>$phongexponenttexture</code> by this amount. {{tip| The default value of this parameter is <code>"0.0"</code>. However, a more reasonable default value would be <code>"149.0"</code>}}|only={{src13mp}}{{tf2}}|shaders=VertexLitGeneric}}
{{MatParamDef|$phongexponentfactor|float|Multiply the exponent from the <code>$phongexponenttexture</code> by this amount. {{tip| The default value of this parameter is <code>"0.0"</code>. However, a more reasonable default value would be <code>"149.0"</code>}}|only={{src13mp}}{{tf2}}|shaders=VertexLitGeneric}}
{{MatParam|$invertphongmask|bool|Invert the value of the phong mask.
{{MatParamDef|$invertphongmask|bool|Invert the value of the phong mask.
{{bug|In {{as}}s and {{src13}}s Shadercode, using this parameter will invert the mask used for {{ent|$envmap}}, not the one used for <code>$phong</code>! }}
{{bug|In {{as}}s and {{src13}}s Shadercode, using this parameter will invert the mask used for {{ent|$envmap}}, not the one used for <code>$phong</code>! }}
{{confirm| Is this the case for all branches?}}
{{confirm| Is this the case for all branches?}}
|since={{src07}}|shaders=VertexLitGeneric}}
|since={{src07}}|shaders=VertexLitGeneric}}
{{MatParam|$forcephong|bool|Force phong shading on phong-using materials even at low GPU levels when <code>mat_phong</code> is disabled.|since={{portal2}}|shaders=VertexLitGeneric}}
{{MatParamDef|$forcephong|bool|Force phong shading on phong-using materials even at low GPU levels when <code>mat_phong</code> is disabled.|since={{portal2}}|shaders=VertexLitGeneric}}
{{MatParam|$diffuseexp|float|Diffuse exponent used for dynamic lights only.
{{MatParamDef|$diffuseexp|float|Diffuse exponent used for dynamic lights only.
{{note|have this with {{ent|$halflambert}} greatly decrease it effect.}}|only={{L4ds}}|shaders=VertexLitGeneric, Infected}}
{{note|have this with {{ent|$halflambert}} greatly decrease it effect.}}|only={{L4ds}}|shaders=VertexLitGeneric, Infected}}
{{MatParam|$shinyblood|int|Derive phong mask from areas that are more red than others. Only when variation is disabled.|only={{L4ds}}|shaders=VertexLitGeneric, Infected}}
{{MatParamDef|$shinyblood|int|Derive phong mask from areas that are more red than others. Only when variation is disabled.|only={{L4ds}}|shaders=VertexLitGeneric, Infected}}
{{MatParam|$shinybloodexponent|int|Exponent for the above.|only={{L4ds}}|shaders=VertexLitGeneric, Infected}}
{{MatParamDef|$shinybloodexponent|int|Exponent for the above.|only={{L4ds}}|shaders=VertexLitGeneric, Infected}}


=== Brillo ===
=== Brillo ===
{{MatParam|$phongboost|float|Phong brightness factor. Larger values create a more intense highlight, useful for surfaces like metal and glass.|shaders=VertexLitGeneric, LightmappedGeneric({{mapbase|only}})}}
{{MatParamDef|$phongboost|float|Phong brightness factor. Larger values create a more intense highlight, useful for surfaces like metal and glass.|shaders=VertexLitGeneric, LightmappedGeneric({{mapbase|only}})}}
{{MatParam|$phongfresnelranges|matrix|See [[Phong materials#Phong Fresnel ranges|Phong Fresnel ranges]]. Default is <code>"[0 0.5 1]"</code>.
{{MatParamDef|$phongfresnelranges|matrix|See [[Phong materials#Phong Fresnel ranges|Phong Fresnel ranges]]. Default is <code>"[0 0.5 1]"</code>.
:{{note|<code>$envmap</code> is also affected by these fresnel ranges if both it and Phong are enabled in a material.}}
:{{note|<code>$envmap</code> is also affected by these fresnel ranges if both it and Phong are enabled in a material.}}
:{{note| drives the x component of a phongwarptexture if specified.}}|shaders=VertexLitGeneric, LightmappedGeneric({{mapbase|only}})}}
:{{note| drives the x component of a phongwarptexture if specified.}}|shaders=VertexLitGeneric, LightmappedGeneric({{mapbase|only}})}}
{{MatParam|$phongdisablehalflambert|bool|Disables forced {{L|$halflambert|half-lambertian}} shading on Phong materials. {{note|This parameter is effectively forced on in {{csgobranch|4}} due to <code>$halflambert</code> being disabled.}}|since={{as}}|also={{gmod}},{{Mapbase}}|shaders=VertexLitGeneric}}
{{MatParamDef|$phongdisablehalflambert|bool|Disables forced {{L|$halflambert|half-lambertian}} shading on Phong materials. {{note|This parameter is effectively forced on in {{csgobranch|4}} due to <code>$halflambert</code> being disabled.}}|since={{as}}|also={{gmod}},{{Mapbase}}|shaders=VertexLitGeneric}}


=== Colores ===
=== Colores ===
{{MatParam|$phongalbedotint|bool|Tints the phong reflection by the color of the <code>$basetexture</code>. The amount of tint is defined by the green channel of <code>$phongexponenttexture</code>. A <code>$phongexponenttexture</code> must be specified in order for <code>$phongalbedotint</code> to work.
{{MatParamDef|$phongalbedotint|bool|Tints the phong reflection by the color of the <code>$basetexture</code>. The amount of tint is defined by the green channel of <code>$phongexponenttexture</code>. A <code>$phongexponenttexture</code> must be specified in order for <code>$phongalbedotint</code> to work.
: {{Warning|<code>$phongalbedotint</code> cannot be used with <code>$phongtint</code>. The later will disable the effect.}}
: {{Warning|<code>$phongalbedotint</code> cannot be used with <code>$phongtint</code>. The later will disable the effect.}}
: {{Note|<code>$phongalbedotint</code> works by multiplying the <code>$basetexture</code> over the reflection, without darkening the albedo. The reflection will get dimmer as a result, so account for this in the phong mask or with <code>$phongboost</code>.}}
: {{Note|<code>$phongalbedotint</code> works by multiplying the <code>$basetexture</code> over the reflection, without darkening the albedo. The reflection will get dimmer as a result, so account for this in the phong mask or with <code>$phongboost</code>.}}
: {{Note|<code>$phongalbedotint</code> will tint highlights by the original color of the <code>$basetexture</code> even when the material is tinted by <code>$color2</code> or <code>rendercolor.</code>}}|since={{src07}}|shaders=VertexLitGeneric}}
: {{Note|<code>$phongalbedotint</code> will tint highlights by the original color of the <code>$basetexture</code> even when the material is tinted by <code>$color2</code> or <code>rendercolor.</code>}}|since={{src07}}|shaders=VertexLitGeneric}}
{{MatParam|$phongalbedoboost|float|Phong albedo overbrightening factor. Ranges 0-255.
{{MatParamDef|$phongalbedoboost|float|Phong albedo overbrightening factor. Ranges 0-255.
: {{note| This will multiply the tint that is being applied to phong from $phongalbedotint.}}
: {{note| This will multiply the tint that is being applied to phong from $phongalbedotint.}}
: {{bug| This does not work when using {{L|$detail}}. }}|since={{csgo}}|also={{gmod}}|shaders=VertexLitGeneric}}
: {{bug| This does not work when using {{L|$detail}}. }}|since={{csgo}}|also={{gmod}}|shaders=VertexLitGeneric}}
[[File:Phongwarp example.png|thumb|200px|The Hunter without and with its <code>$phongwarptexture</code>, showing how it affects the Phong reflection.]]
[[File:Phongwarp example.png|thumb|200px|The Hunter without and with its <code>$phongwarptexture</code>, showing how it affects the Phong reflection.]]
{{MatParam|$phongtint|RGB matrix|Color tint of the phong reflection.
{{MatParamDef|$phongtint|RGB matrix|Color tint of the phong reflection.
: {{Warning|This will override <code>$phongalbedotint</code> if both are used.}}
: {{Warning|This will override <code>$phongalbedotint</code> if both are used.}}
: {{note| Also tints {{ent|$rimlight}}}}|since={{src07}}|shaders=VertexLitGeneric}}
: {{note| Also tints {{ent|$rimlight}}}}|since={{src07}}|shaders=VertexLitGeneric}}
[[File:Phongwarp_coordinate_guide.png|thumb|200px|Breakdown of the $phongwarptexture: computed coordinates, texture and result]]
[[File:Phongwarp_coordinate_guide.png|thumb|200px|Breakdown of the $phongwarptexture: computed coordinates, texture and result]]
{{MatParam|$phongwarptexture|texture|Used to create an iridescence effect, as seen on Episode Two's {{L|npc_hunter|Hunters}}.
{{MatParamDef|$phongwarptexture|texture|Used to create an iridescence effect, as seen on Episode Two's {{L|npc_hunter|Hunters}}.
: The highlight is multiplied with a texture. The coordinates of the sampled pixel are as follows:
: The highlight is multiplied with a texture. The coordinates of the sampled pixel are as follows:
:x: 1 - (distance to the center of the highlight)
:x: 1 - (distance to the center of the highlight)
Line 89: Line 89:


===Parámetros de sombreado de sólidos {{csgobranch|only}}{{also|{{gmod}}}}===
===Parámetros de sombreado de sólidos {{csgobranch|only}}{{also|{{gmod}}}}===
{{MatParam|$phongmaskcontrastbrightness|and=$phongmaskcontrastbrightness2|vector2|The first value controls the contrast level between light and dark areas in the mask, and the second value controls the overall brightness.  
{{MatParamDef|$phongmaskcontrastbrightness|and=$phongmaskcontrastbrightness2|vector2|The first value controls the contrast level between light and dark areas in the mask, and the second value controls the overall brightness.  
: <code>$phongmaskcontrastbrightness2</code> is for <code>WorldVertexTransition</code>'s second material.
: <code>$phongmaskcontrastbrightness2</code> is for <code>WorldVertexTransition</code>'s second material.
: {{todo|Find out the range of both values.}}|shaders=LightmappedGeneric, WorldVertexTransition}}
: {{todo|Find out the range of both values.}}|shaders=LightmappedGeneric, WorldVertexTransition}}
{{MatParam|$phongamount|and=$phongamount2|vector4|The first 3 values control the color tint, and the fourth value controls the brightness. The fourth value can go beyond 1, but affects the brightness of the whole texture, not just the highlight.  
{{MatParamDef|$phongamount|and=$phongamount2|vector4|The first 3 values control the color tint, and the fourth value controls the brightness. The fourth value can go beyond 1, but affects the brightness of the whole texture, not just the highlight.  
: <code>$phongamount2</code> is for <code>WorldVertexTransition</code>'s second material.|shaders=LightmappedGeneric, WorldVertexTransition}}
: <code>$phongamount2</code> is for <code>WorldVertexTransition</code>'s second material.|shaders=LightmappedGeneric, WorldVertexTransition}}
{{MatParam|$phongbasetint|and=$phongbasetint2|float|Allows the <code>$basetexture</code> and/or <code>$basetexture2</code> to tint the color of the Phong highlight.|shaders=LightmappedGeneric, WorldVertexTransition}}
{{MatParamDef|$phongbasetint|and=$phongbasetint2|float|Allows the <code>$basetexture</code> and/or <code>$basetexture2</code> to tint the color of the Phong highlight.|shaders=LightmappedGeneric, WorldVertexTransition}}


== Comandos de consola ==
== Comandos de consola ==
{{IO|mat_phong|param=bool|Desactiva o activa el sombreado phong. Por defecto 1.}}
{{varcom|start}}
{{varcom|mat_phong||bool|Desactiva o activa el sombreado phong. Por defecto 1.}}
{{varcom|end}}


== Véase también ==
== Véase también ==

Latest revision as of 12:06, 23 August 2025

English (en)Español (es)Русский (ru)中文 (zh)Translate (Translate)
Pendiente: Arreglar plantilla para corregir el texto en esta página.

$phong es un parámetro de un shader(en) disponible en todos los juegos de Source Source desde(en) Source 2006 Source 2006.

Sombreado phong en la piel, el pelo y los labios de Alyx.

También está disponible en sombreado Shader-ball.png LightmappedGeneric y Shader-ball.png WorldVertexTransition en todos los juegos desde Counter-Strike: Global Offensive Counter-Strike: Global Offensive. proporcionando reflexión difusa a baja intensidad y resaltado especular, enmascarados con una textura que controla su intensidad mediante téxeles. Para una explicación completa, véase materiales phong(en).

Note.pngNota:El sombreado phong LightmappedGeneric y WorldVertexTransition solo está disponible en CS:GO rama de motor CS:GO rama de motor. Es necesario que la luz solar ilumine el material de una entidad env_cascade_light para que funcione adecuadamente y usa sombras dinámicas generadas como máscara sobre las máscaras de sombreado tradicional ((en todos juegos desde Strata Source) env_projectedtexture 4 también afecta a los sólidos con sombreado phong activado)
Note.pngNota:El sombreado phong para LightmappedGeneric también está disponible en Mapbase Mapbase, pero se implementa distinto.

Sintaxis

$phong <bool(en)>
Note.pngNota:Todos los parámetros del siguiente ejemplo deben estar especificados en el material, de otro modo el sombreado phong no se muestra, excepto en Insurgency Insurgency.
Pendiente: Otros juegos que no necesitan parámetros phong (como Portal 2 en adelante)
VertexLitGeneric
{
	$phong 1

	$bumpmap				[texture]
	$phongexponent			5			// either/or
	$phongexponenttexture	[texture]	// either/or
	$phongboost				1.0
	$phongfresnelranges		"[0 0.5 1]"
}


Parámetros

Enmascarado

Warning.pngAviso:There are some caveats regarding $normalmapalphaenvmapmask and $selfillumfresnel when using $phong!


Phong requires mask. The alpha channel(en) of a bump map(en) acts as a Phong mask by default.
$basemapalphaphongmask(en) <boolean(en)> (en todos juegos desde Source 2007)
Shader(s): VertexLitGeneric
Use $basetexture's alpha channel(en) as the Phong mask instead of $bumpmap's alpha channel(en).
Warning.pngAviso:Using this with $normalmapalphaenvmapmask will override the mask used for $envmap to be the contents of the $basetexture's alpha channel!
Warning.pngAviso:Garry's Mod Garry's Mod Using this with $normalmapalphaenvmapmask and $envmap renders in $envmap and $phong be masked by both $basemapalphaphongmask alpha channel and $normalmapalphaenvmapmask alpha channel.
$basemapluminancephongmask(en) <boolean(en)> (en todos juegos desde Left 4 Dead)
Shader(s): VertexLitGeneric
Mask phong intensity based on the brightness of the $basetexture.
Icon-Bug.pngError:Basetexture Luminance will replace the mask used for $envmap, if $normalmapalphaenvmapmask is used.  [todo tested in ?]
Icon-Bug.pngError:Doesn't work in Garry's Mod Garry's Mod.  [todo tested in ?]
A global exponent value. Overrides an exponent mask if present.
$phongexponent2 is for WorldVertexTransition's second material in CS:GO rama de motor CS:GO rama de motor.
Shader(s): VertexLitGeneric
A per-texel exponent map. In an exponent map:
  • Red channel: Exponent mask (size of highlight, 0-255, where a value of 0 is a large highlight, 255 small.)
  • Green channel: Albedo tint mask (only if $phongalbedotint 1, 0-255, where a value of 0 is no tint, 255 full tint.)
  • Blue channel: Nothing.
  • Alpha channel: $rimlight mask (only if $rimmask 1.)
Note.pngNota:LightmappedGeneric and WorldVertexTransition do not have support for $phongexponenttexture. You must use $phongexponent instead.
$phongexponentfactor(en) <float(en)> (only in Source 2013 MultiplayerTeam Fortress 2)
Shader(s): VertexLitGeneric
Multiply the exponent from the $phongexponenttexture by this amount.
Tip.pngConsejo: The default value of this parameter is "0.0". However, a more reasonable default value would be "149.0"
$invertphongmask(en) <boolean(en)> (en todos juegos desde Source 2007)
Shader(s): VertexLitGeneric
Invert the value of the phong mask.
Icon-Bug.pngError:In Alien Swarms and Source 2013s Shadercode, using this parameter will invert the mask used for $envmap, not the one used for $phong!   [todo tested in ?]
Confirmar: Is this the case for all branches?
$forcephong(en) <boolean(en)> (en todos juegos desde Portal 2)
Shader(s): VertexLitGeneric
Force phong shading on phong-using materials even at low GPU levels when mat_phong is disabled.
$diffuseexp(en) <float(en)> (only in serie Left 4 Deadserie Left 4 Dead)
Shader(s): VertexLitGeneric, Infected
Diffuse exponent used for dynamic lights only.
Note.pngNota:have this with $halflambert greatly decrease it effect.
$shinyblood(en) <integer(en)> (only in serie Left 4 Deadserie Left 4 Dead)
Shader(s): VertexLitGeneric, Infected
Derive phong mask from areas that are more red than others. Only when variation is disabled.
$shinybloodexponent(en) <integer(en)> (only in serie Left 4 Deadserie Left 4 Dead)
Shader(s): VertexLitGeneric, Infected
Exponent for the above.

Brillo

Shader(s): VertexLitGeneric, LightmappedGeneric((only in Mapbase))
Phong brightness factor. Larger values create a more intense highlight, useful for surfaces like metal and glass.
Shader(s): VertexLitGeneric, LightmappedGeneric((only in Mapbase))
See Phong Fresnel ranges. Default is "[0 0.5 1]".
Note.pngNota:$envmap is also affected by these fresnel ranges if both it and Phong are enabled in a material.
Note.pngNota: drives the x component of a phongwarptexture if specified.
$phongdisablehalflambert(en) <boolean(en)> (en todos juegos desde Alien Swarm) (también en Garry's Mod,Mapbase)
Shader(s): VertexLitGeneric
Disables forced half-lambertian(en) shading on Phong materials.
Note.pngNota:This parameter is effectively forced on in CS:GO rama de motor CS:GO rama de motor due to $halflambert being disabled.

Colores

$phongalbedotint(en) <boolean(en)> (en todos juegos desde Source 2007)
Shader(s): VertexLitGeneric
Tints the phong reflection by the color of the $basetexture. The amount of tint is defined by the green channel of $phongexponenttexture. A $phongexponenttexture must be specified in order for $phongalbedotint to work.
Warning.pngAviso:$phongalbedotint cannot be used with $phongtint. The later will disable the effect.
Note.pngNota:$phongalbedotint works by multiplying the $basetexture over the reflection, without darkening the albedo. The reflection will get dimmer as a result, so account for this in the phong mask or with $phongboost.
Note.pngNota:$phongalbedotint will tint highlights by the original color of the $basetexture even when the material is tinted by $color2 or rendercolor.
$phongalbedoboost(en) <float(en)> (en todos juegos desde Counter-Strike: Global Offensive) (también en Garry's Mod)
Shader(s): VertexLitGeneric
Phong albedo overbrightening factor. Ranges 0-255.
Note.pngNota: This will multiply the tint that is being applied to phong from $phongalbedotint.
Icon-Bug.pngError: This does not work when using $detail(en).   [todo tested in ?]
The Hunter without and with its $phongwarptexture, showing how it affects the Phong reflection.
$phongtint(en) <RGB(en) matrix(en)> (en todos juegos desde Source 2007)
Shader(s): VertexLitGeneric
Color tint of the phong reflection.
Warning.pngAviso:This will override $phongalbedotint if both are used.
Note.pngNota: Also tints $rimlight
Breakdown of the $phongwarptexture: computed coordinates, texture and result
$phongwarptexture(en) <texture(en)> (en todos juegos desde Source 2007)
Shader(s): VertexLitGeneric
Used to create an iridescence effect, as seen on Episode Two's Hunters(en).
The highlight is multiplied with a texture. The coordinates of the sampled pixel are as follows:
x: 1 - (distance to the center of the highlight)
y: 1 - (fresnel component as computed by Phong Fresnel ranges)
Note.pngNota:Disables the initial phongfresnelranges masking
Icon-Bug.pngError:Does not work in Left 4 Dead 2 Left 4 Dead 2.  [todo tested in ?]
Brush phong in Counter-Strike: Global Offensive Counter-Strike: Global Offensive using tile/hr_t/inferno/tile_a. Note the complete absence of the reflection in the shaded area.

Parámetros de sombreado de sólidos (only in CS:GO rama de motor)(también en Garry's Mod)

Shader(s): LightmappedGeneric, WorldVertexTransition
The first value controls the contrast level between light and dark areas in the mask, and the second value controls the overall brightness.
$phongmaskcontrastbrightness2 is for WorldVertexTransition's second material.
Pendiente: Find out the range of both values.
Shader(s): LightmappedGeneric, WorldVertexTransition
The first 3 values control the color tint, and the fourth value controls the brightness. The fourth value can go beyond 1, but affects the brightness of the whole texture, not just the highlight.
$phongamount2 is for WorldVertexTransition's second material.
Shader(s): LightmappedGeneric, WorldVertexTransition
Allows the $basetexture and/or $basetexture2 to tint the color of the Phong highlight.

Comandos de consola

Cvar/Command Parameters or default value Descriptor Effect
mat_phong bool Desactiva o activa el sombreado phong. Por defecto 1.

Véase también

Enlaces externos