LightmappedGeneric: Difference between revisions
Line 11: | Line 11: | ||
{{MatParam|[[$detail]]|texture|Detail texturing.}} | {{MatParam|[[$detail]]|texture|Detail texturing.}} | ||
{{MatParam|[[$surfaceprop]]|string|Links the surface to a set of physical properties.}} | {{MatParam|[[$surfaceprop]]|string|Links the surface to a set of physical properties.}} | ||
=== Adjustment === | === Adjustment === | ||
{{MatParam|[[$basetexture|$basetexturetransform]]|matrix| Transforms the texture before use in the material. This does not affect [[lightmap]]s on the surface. }} | |||
{{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|[[Decal|$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|[[$modelmaterial]]|material|A separate [[VertexLitGeneric]] material to that will replace this one if the decal hits a [[Model|model]]. }} | {{MatParam|[[$detail|$detailscale]]|float|Fits the detail texture onto the material the given number of times (default {{=}} 4). Generally used instead of <code>$detailtexturetransform</code> 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: <code>$detailscale "[ 4 8 ]"</code>}} | ||
{{MatParam|[[$detail|$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|[[$detail|$detailblendmode]]|int|How to combine the detail material with the albedo.}} | |||
{{MatParam|[[Decal|$modelmaterial]]|material|A separate [[VertexLitGeneric]] material to that will replace this one if the decal hits a [[Model|model]]. }} | |||
{{MatParam|[[$pointsamplemagfilter]] {{only|{{csgo}}}}|bool|Disables texture filtering.}} | {{MatParam|[[$pointsamplemagfilter]] {{only|{{csgo}}}}|bool|Disables texture filtering.}} | ||
{{MatParam|[[$seamless_scale]] {{since|{{src07}}}}]]|float|Mitigation for displacement texture stretching.}} | {{MatParam|[[$seamless_scale]] {{since|{{src07}}}}]]|float|Mitigation for displacement texture stretching.}} | ||
Line 41: | Line 44: | ||
{{warning|Standard phong color is always white and don't depend on the color of [[light_environment]] or [[env_cascade_light]].}} | {{warning|Standard phong color is always white and don't depend on the color of [[light_environment]] or [[env_cascade_light]].}} | ||
{{bug|Normal map does not affect phong reflections if there is empty $envmap on the material, or if you haven't assigned any brush face on [[env_cubemap]] entity.}}}} | {{bug|Normal map does not affect phong reflections if there is empty $envmap on the material, or if you haven't assigned any brush face on [[env_cubemap]] entity.}}}} | ||
=== Texture Organization === | |||
{{MatParam|[[%keywords]]|bool|Sets a keyword filter that can be filtered in hammer for easier texture finding.}} | |||
{{MatParam|[[%notooltexture]]|bool|Hides the material from Hammer's texture browser.}} | |||
{{MatParam|[[%tooltexture]]|texture|Used to blend texture previews in [[Hammer]].}} | |||
=== Effect === | === Effect === |
Revision as of 12:30, 3 June 2023
LightmappedGeneric
It is the shader most commonly used to render brushes, displacements and lightmapped surfaces.
Only some games like support this shader to be used on models.
Supported Parameters
Basics
[[$basetexture|$basetexture]]
[[$decal|$decal]]
[[$detail|$detail]]
[[$surfaceprop|$surfaceprop]]
Adjustment
[[$basetexturetransform|$basetexturetransform]]
[[$color|$color]]
[[$decalscale|$decalscale]]
[[$detailscale|$detailscale]]
[[$detailblendfactor|$detailblendfactor]]
[[$detailblendmode|$detailblendmode]]
[[$modelmaterial|$modelmaterial]]
[[$pointsamplemagfilter (only in
)|$pointsamplemagfilter (only in
)]]
[[$seamless_scale (in all games since
)]]|$seamless_scale (in all games since
)]]]]
Transparency
[[$alpha|$alpha]]
[[$alphatest|$alphatest]]
[[$distancealpha (in all games since
)|$distancealpha (in all games since
)]]
[[$nocull|$nocull]]
[[$translucent|$translucent]]
Lighting
[[$bumpmap|$bumpmap]]
[[$lightwarptexture (in all games since
)|$lightwarptexture (in all games since
)]]
[[$selfillum|$selfillum]]
[[$ssbump (in all games since
)|$ssbump (in all games since
)]]
Reflection
[[$envmap|$envmap]]
[[$phong (only in
)|$phong (only in
)]]
Texture Organization
[[%keywords|%keywords]]
[[%notooltexture|%notooltexture]]
[[%tooltexture|%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.