LightmappedGeneric: Difference between revisions
ShiroDkxtro2 (talk | contribs) m (→Lighting: CS:GO Caveat for $LightwarpTexture / consistency) |
(Uses MatParam template for material parameters) |
||
Line 7: | Line 7: | ||
=== Basics === | === Basics === | ||
{{MatParam|[[$basetexture]]|texture|Defines an albedo texture.}} | |||
{{MatParam|[[$decal]]|bool|Use this material as a decal.}} | |||
{{MatParam|[[$detail]]|texture|Detail texturing.}} | |||
{{MatParam|[[$surfaceprop]]|string|Links the surface to a set of physical properties.}} | |||
{{MatParam|[[%tooltexture]]|material|Used to blend texture previews in Hammer.}} | |||
=== Adjustment === | === Adjustment === | ||
{{MatParam|[[$color]]|RGB matrix|Independently scales the red, green and blue channels of an albedo.}} | |||
{{MatParam|[[$pointsamplemagfilter]] {{only|{{csgo}}}}|bool|Disables texture filtering.}} | |||
{{MatParam|[[$seamless_scale]] {{since|{{src07}}}}]]|float|Mitigation for displacement texture stretching.}} | |||
=== Transparency === | === Transparency === | ||
{{MatParam|[[$alpha]]|float|Scales the opacity of an entire material.}} | |||
{{MatParam|[[$alphatest]]|bool|Specifies a mask to use to determine binary opacity.}} | |||
{{MatParam|[[$distancealpha]] {{since|{{src07}}}}|bool|Vector-like edge filtering.}} | |||
{{MatParam|[[$nocull]]|bool|Disables backface culling.}} | |||
{{MatParam|[[$translucent]]|bool|Specifies that the material should be partially see-through.}} | |||
=== Lighting === | === Lighting === | ||
{{MatParam|[[$bumpmap]]|texture|Specifies a texture that will provide three-dimensional lighting information for a material.}} | |||
{{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}}.}}}} | |||
{{MatParam|[[$selfillum]]|bool|Determines whether the surface is self-illuminated independent of environment lighting.}} | |||
{{MatParam|[[$ssbump]] {{since|{{src07}}}}|bool|Flags the {{ent|$bumpmap}} as being a self-shadowing bumpmap.}} | |||
=== Reflection === | === Reflection === | ||
{{MatParam|[[$envmap]]|cubemap|Specular reflections.}} | |||
{{MatParam|[[$phong]] {{only|{{csgo}}}}|bool|Diffuse reflections. | |||
{{note|Phong is reflected only from [[env_cascade_light]].}} | |||
:{{todo|Are there reflections from any other light sources?.}} | |||
{{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.}}}} | |||
=== Effect === | === Effect === | ||
{{MatParam|[[$nofog]]|bool|Prevents fog from overdrawing a material.}} | |||
== Caveats == | == Caveats == |
Revision as of 11:34, 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]]
[[%tooltexture|%tooltexture]]
Adjustment
[[$color|$color]]
[[$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
)]]
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.