$phong: Difference between revisions
Jump to navigation
Jump to search
Note:Phong shading for
. It requires the material to be lit by a env_cascade_light entity to work properly, and uses the dynamic shadows generated by it as a mask on top of the traditional phong masking.
Note:All parameters in the following example must be specified in the material, otherwise the phong shader won't show up at all, except in
.
Deprecated (talk | contribs) (Combined some "2" parameters with their counterpart parameters, changed brush shader parameters to CSGO only as they aren't in any other games) |
Eternifity (talk | contribs) mNo edit summary |
||
Line 70: | Line 70: | ||
{{MatParam|$phongamount|and=$phongamount2|vector4|<code>LightmappedGeneric</code> and <code>WorldVertexTransition</code> only. 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. | {{MatParam|$phongamount|and=$phongamount2|vector4|<code>LightmappedGeneric</code> and <code>WorldVertexTransition</code> only. 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.|only=CSGO}} | : <code>$phongamount2</code> is for <code>WorldVertexTransition</code>'s second material.|only=CSGO}} | ||
{{MatParam|$phongbasetint|and=$phongbasetint2|float| | {{MatParam|$phongbasetint|and=$phongbasetint2|float|Tints the phong color by the diffuse texture|only=CSGO}} | ||
== See also == | == See also == |
Revision as of 15:38, 28 November 2019
Template:Shaderparam It provides diffuse reflections, masked by a texture to control its intensity per-texel. For a full explanation, see Phong materials.

LightmappedGeneric
and WorldVertexTransition
is only available in 
Syntax
$phong <bool>


- Todo: Other games that don't require all phong parameters present (likely Portal 2 and up)
VertexLitGeneric
{
$phong 1
$bumpmap [texture]
$phongexponent 5 // either/or
$phongexponenttexture [texture] // either/or
$phongboost 1.0
$phongfresnelranges "[0 0.5 1]"
}
Parameters
Masking
$bumpmap
$basemapalphaphongmask
$basemapluminancephongmask
$phongexponent
$phongexponenttexture
$invertphongmask
$phongexponentfactor
$forcephong
$shinyblood
$shinybloodexponent
$diffuseexp
Brightness
$phongboost
$phongfresnelranges
$phongdisablehalflambert
$ambientocclusiontexture
Colours
$phongalbedotint
$phongalbedoboost
Brush Shader Parameters
$phongmaskcontrastbrightness
$phongamount
$phongbasetint
See also
- Phong materials
- $envmap (environment map)
- $lightwarptexture
- $rimlight