LightmappedGeneric: Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) |
SirYodaJedi (talk | contribs) m (Fix some formatting) |
||
Line 16: | Line 16: | ||
{{MatParam|$color|RGB matrix|Independently scales the red, green and blue channels of an albedo.}} | {{MatParam|$color|RGB matrix|Independently scales the red, green and blue channels of an albedo.}} | ||
{{MatParam|$decalscale|float|Same as a brush face's texture scale value: the number of [[unit|units]] that each [[texel]] covers. Normally 0.25 or lower. }} | {{MatParam|$decalscale|float|Same as a brush face's texture scale value: the number of [[unit|units]] that each [[texel]] covers. Normally 0.25 or lower. }} | ||
{{MatParam|$detailscale|float|Fits the detail texture onto the material the given number of times (default {{=}} 4). Generally used instead of | {{MatParam|$detailscale|float|Fits the detail texture onto the material the given number of times (default {{=}} 4). Generally used instead of {{mono|$detailtexturetransform}} with a value of around 7 or 8 for a 128px detail texture. To independently scale the X and Y coordinates, place your values in brackets: {{mono|$detailscale "[ 4 8 ]"}}}} | ||
{{MatParam|$detailblendfactor|normal|Controls the amount that the detail texture affects the base texture. The precise use of this depends on the blend factor; in most cases it acts similarly to [[$alpha]]. A value of 0 usually makes the detail texture have no effect, whilst a value of 1 applies the full effect.}} | {{MatParam|$detailblendfactor|normal|Controls the amount that the detail texture affects the base texture. The precise use of this depends on the blend factor; in most cases it acts similarly to [[$alpha]]. A value of 0 usually makes the detail texture have no effect, whilst a value of 1 applies the full effect.}} | ||
{{MatParam|$detailblendmode|int|How to combine the detail material with the albedo.}} | {{MatParam|$detailblendmode|int|How to combine the detail material with the albedo.}} | ||
{{MatParam|$modelmaterial|material|A separate [[VertexLitGeneric]] material to that will replace this one if the decal hits a [[Model|model]]. }} | {{MatParam|$modelmaterial|material|A separate [[VertexLitGeneric]] material to that will replace this one if the decal hits a [[Model|model]]. }} | ||
{{MatParam|$pointsamplemagfilter | {{MatParam|$pointsamplemagfilter|bool|only={{csgo}}|Disables texture filtering.}} | ||
{{MatParam|$seamless_scale | {{MatParam|$seamless_scale|since={{src07}}|float|Mitigation for displacement texture stretching.}} | ||
=== Transparency === | === Transparency === | ||
{{MatParam|$alpha|float|Scales the opacity of an entire material.}} | {{MatParam|$alpha|float|Scales the opacity of an entire material.}} | ||
{{MatParam|$alphatest|bool|Specifies a mask to use to determine binary opacity.}} | {{MatParam|$alphatest|bool|Specifies a mask to use to determine binary opacity.}} | ||
{{MatParam|$distancealpha | {{MatParam|$distancealpha|since={{src07}}|bool|Vector-like edge filtering.}} | ||
{{MatParam|$nocull|bool|Disables backface culling.}} | {{MatParam|$nocull|bool|Disables backface culling.}} | ||
{{MatParam|$translucent|bool|Specifies that the material should be partially see-through.}} | {{MatParam|$translucent|bool|Specifies that the material should be partially see-through.}} | ||
Line 32: | Line 32: | ||
=== Lighting === | === Lighting === | ||
{{MatParam|$bumpmap|texture|Specifies a texture that will provide three-dimensional lighting information for a material.}} | {{MatParam|$bumpmap|texture|Specifies a texture that will provide three-dimensional lighting information for a material.}} | ||
{{MatParam|$lightwarptexture | {{MatParam|$lightwarptexture|since={{src06}}|texture|Per-texel color modification via a warp texture. | ||
{{Note|Does not appear to be featured on {{ent|LightmappedGeneric}} in {{csgobranch|4}}.}}}} | {{Note|Does not appear to be featured on {{ent|LightmappedGeneric}} in {{csgobranch|4}}.}}}} | ||
{{MatParam|$selfillum|bool|Determines whether the surface is self-illuminated independent of environment lighting.}} | {{MatParam|$selfillum|bool|Determines whether the surface is self-illuminated independent of environment lighting.}} | ||
{{MatParam|$ssbump | {{MatParam|$ssbump|since={{src07}}|bool|Flags the {{ent|$bumpmap}} as being a self-shadowing bumpmap.}} | ||
=== Reflection === | === Reflection === | ||
{{MatParam|$envmap|cubemap|Specular reflections.}} | {{MatParam|$envmap|cubemap|Specular reflections.}} | ||
{{MatParam|$phong | {{MatParam|$phong|only={{csgo}}|bool|Diffuse reflections. | ||
{{note|Phong is reflected only from [[env_cascade_light]].}} | {{note|Phong is reflected only from [[env_cascade_light]].}} | ||
:{{todo|Are there reflections from any other light sources?.}} | :{{todo|Are there reflections from any other light sources?.}} | ||
Line 56: | Line 56: | ||
=== Mapbase === | === Mapbase === | ||
LightmappedGeneric materials in [[Mapbase]] should have the shader ''' | LightmappedGeneric materials in [[Mapbase]] should have the shader '''{{mono|SDK_LightmappedGeneric}}'''. | ||
== See also == | == See also == | ||
* | *{{mono|[[WorldVertexTransition]]}}, a shader used on displacements to blend two materials together. | ||
* | *{{mono|[[LightmappedTwoTexture]]}}, a brush shader that multiplies a texture on top of another one. | ||
* | *{{mono|[[Lightmapped_4WayBlend]]}}, a shader used on displacements to blend up to four materials together. |
Revision as of 19:53, 25 June 2023
LightmappedGeneric
It is the shader most commonly used to render brushes, displacements and lightmapped surfaces.
Only some games like support using this shader on models.
Todo: Which other games support it?
Supported Parameters
Basics
$basetexture
$decal
$detail
$surfaceprop
Adjustment
$basetexturetransform
$color
$decalscale
$detailscale
$detailblendfactor
$detailblendmode
$modelmaterial
$pointsamplemagfilter
$seamless_scale
Transparency
$alpha
$alphatest
$distancealpha
$nocull
$translucent
Lighting
$bumpmap
$lightwarptexture
$selfillum
$ssbump
Reflection
Texture Organization
%keywords
%notooltexture
%tooltexture
Effect
Caveats
Mapbase
LightmappedGeneric materials in Mapbase should have the shader SDK_LightmappedGeneric.
See also
- WorldVertexTransition, a shader used on displacements to blend two materials together.
- LightmappedTwoTexture, a brush shader that multiplies a texture on top of another one.
- Lightmapped_4WayBlend, a shader used on displacements to blend up to four materials together.