$phong
< Es
Jump to navigation
Jump to search
Pendiente: Arreglar plantilla para corregir el texto en esta página.
$phong es un parámetro de un shader disponible en todos los juegos de
Source desde
Source 2006.
También está disponible en sombreado LightmappedGeneric y WorldVertexTransition en todos los juegos desde
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.
LightmappedGeneric y WorldVertexTransition solo está disponible en LightmappedGeneric también está disponible en Sintaxis
$phong <bool>
- 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
- Using $selfillumfresnel without $normalmapalphaenvmapmask will mask the $envmap using the $basetexture's alpha channel.
- Using $selfillumfresnel with $normalmapalphaenvmapmask will multiply the $envmap by
0.0f. Effectively disabling the effect! - When not using $selfillumfresnel. The mask used for $envmap will be the $basetexture's alpha channel unless $normalmapalphaenvmapmask is also used.
- If $normalmapalphaenvmapmask is used, the $bumpmap's alpha channel will be used for Phong masking. Using either
$basemapalphaphongmaskor$basemapluminancephongmaskwill override it.
- $bumpmap <texture>
- Phong requires mask. The alpha channel of a bump map acts as a Phong mask by default.
- $basemapalphaphongmask <boolean> (en todos juegos desde
)
- Shader(s): VertexLitGeneric
- Use $basetexture's alpha channel as the Phong mask instead of
$bumpmap's alpha channel.
Aviso: Using this with $normalmapalphaenvmapmask will override the mask used for $envmap to be the contents of the $basetexture's alpha channel!
Aviso:
Garry's Mod Using this with $normalmapalphaenvmapmask and $envmap renders in $envmap and $phongbe masked by both$basemapalphaphongmaskalpha channel and $normalmapalphaenvmapmask alpha channel.
- $basemapluminancephongmask <boolean> (en todos juegos desde
)
- Shader(s): VertexLitGeneric
- Mask phong intensity based on the brightness of the
$basetexture.
Error:Basetexture Luminance will replace the mask used for $envmap, if $normalmapalphaenvmapmask is used. [todo tested in ?]
Error:Doesn't work in
Garry's Mod. [todo tested in ?]
- $phongexponent and $phongexponent2 <integer>
- A global exponent value. Overrides an exponent mask if present.
$phongexponent2is forWorldVertexTransition's second material in
CS:GO rama de motor.
- $phongexponenttexture <texture>
- 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.)
Nota: LightmappedGenericandWorldVertexTransitiondo not have support for$phongexponenttexture. You must use$phongexponentinstead.
- $phongexponentfactor <float> (only in

)
- Shader(s): VertexLitGeneric
- Multiply the exponent from the
$phongexponenttextureby this amount.
Consejo: The default value of this parameter is "0.0". However, a more reasonable default value would be"149.0"
- $invertphongmask <boolean> (en todos juegos desde
)
- Shader(s): VertexLitGeneric
- Invert the value of the phong mask.
Confirmar: Is this the case for all branches?
- $forcephong <boolean> (en todos juegos desde
)
- Shader(s): VertexLitGeneric
- Force phong shading on phong-using materials even at low GPU levels when
mat_phongis disabled.
- $diffuseexp <float> (only in

)
- Shader(s): VertexLitGeneric, Infected
- Diffuse exponent used for dynamic lights only.
Nota: have this with $halflambert greatly decrease it effect.
- $shinyblood <integer> (only in

)
- Shader(s): VertexLitGeneric, Infected
- Derive phong mask from areas that are more red than others. Only when variation is disabled.
- $shinybloodexponent <integer> (only in

)
- Shader(s): VertexLitGeneric, Infected
- Exponent for the above.
Brillo
- $phongboost <float>
- Shader(s): VertexLitGeneric, LightmappedGeneric((only in
)) - Phong brightness factor. Larger values create a more intense highlight, useful for surfaces like metal and glass.
- $phongfresnelranges <matrix>
- Shader(s): VertexLitGeneric, LightmappedGeneric((only in
)) - See Phong Fresnel ranges. Default is
"[0 0.5 1]".
Nota: $envmapis also affected by these fresnel ranges if both it and Phong are enabled in a material.
Nota: drives the x component of a phongwarptexture if specified.
- $phongdisablehalflambert <boolean> (en todos juegos desde
) (también en
,
)
- Shader(s): VertexLitGeneric
- Disables forced half-lambertian shading on Phong materials.
Nota: This parameter is effectively forced on in
CS:GO rama de motor due to $halflambertbeing disabled.
Colores
- $phongalbedotint <boolean> (en todos juegos desde
)
- 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$phongexponenttexturemust be specified in order for$phongalbedotintto work.
Aviso: $phongalbedotintcannot be used with$phongtint. The later will disable the effect.
Nota: $phongalbedotintworks by multiplying the$basetextureover 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.
Nota: $phongalbedotintwill tint highlights by the original color of the$basetextureeven when the material is tinted by$color2orrendercolor.
- $phongalbedoboost <float> (en todos juegos desde
) (también en
)
- Shader(s): VertexLitGeneric
- Phong albedo overbrightening factor. Ranges 0-255.
Nota: This will multiply the tint that is being applied to phong from $phongalbedotint.
- $phongtint <RGB matrix> (en todos juegos desde
)
- Shader(s): VertexLitGeneric
- Color tint of the phong reflection.
Aviso: This will override $phongalbedotintif both are used.
Nota: Also tints $rimlight
- $phongwarptexture <texture> (en todos juegos desde
)
- Shader(s): VertexLitGeneric
- Used to create an iridescence effect, as seen on Episode Two's Hunters.
- 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)
Nota: Disables the initial phongfresnelranges masking
Error:Does not work in
Left 4 Dead 2. [todo tested in ?]
Brush phong in
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
)(también en
)
- $phongmaskcontrastbrightness and $phongmaskcontrastbrightness2 <vector2>
- 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.
$phongmaskcontrastbrightness2is forWorldVertexTransition's second material.- Pendiente: Find out the range of both values.
- $phongamount and $phongamount2 <vector4>
- 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.
$phongamount2is forWorldVertexTransition's second material.
- $phongbasetint and $phongbasetint2 <float>
- Shader(s): LightmappedGeneric, WorldVertexTransition
- Allows the
$basetextureand/or$basetexture2to 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
- Materiales phong
- $envmap (mapa del entorno)
- $lightwarptexture
- $rimlight
Enlaces externos
- $Phong en sólidos*: The Hacky Way: Una guía de TF2maps.net sobre cómo aplicar falsos $Phong en sólidos para juegos previos a CS:GO. También se puede usar para hacer phong falsos en objetos del mapa iluminados por vértice, sin reducir su calidad.
- SubstancePainter Sombreado phong complejo en motor Source