LightmappedReflective: Difference between revisions
Jump to navigation
Jump to search
Warning:All parameters listed in the example (except $bumpframe, %tooltexture and $surfaceprop) must be included when used, or func_reflective_glass may not work properly.
Counter-Strike: Global Offensive additionally requires $translucent.
Important:This shader must be used on a brush tied to a func_reflective_glass, or the real time reflections will fail to work and it will be rendered as a plain brush.
Bug:In
Black Mesa this shader was missed in the deferred renderer update. To achieve the same effect, use 3D Skybox with logic_measure_movement to simulate reflection[Elaborate?] or use the
Note:Not available in DirectX 8 and earlier, and lacks shader fallbacks.
Bug:Stops correction and reflection itself if you look at reflective water. [todo tested in ?]
Bug:Adding proxies to a lightmappedreflective causes the texture to not be drawn. (Could this be because it includes some default proxy in order for it to work, and once there is a user-defined proxy, those "behind the scenes" proxies are no longer there?) [todo tested in ?]
Bug:If there is a portal in the reflection in
Portal 2 and Portal 2 branch games, it will cause the game to crash. Almost works in The Beginner Guide under the same conditions. This is fixed in
Portal 2: Community Edition [todo tested in ?]
Warning:Although this is functional in
Portal, the reflection does not update when viewed through portals and portals will only update in the reflection if both of them are visible to you and to the func_reflective glass. Also, if the portals are rotated differently and viewed through the func_reflective_glass, the portals will display incorrectly. This second bug has carried over into Portal 2 and Portal 2: Community Edition
Warning:$bumpmap is NOT supported! $normalmap must be used!
No edit summary |
(added screenshot.) |
||
Line 1: | Line 1: | ||
{{this is a|pixel shader|since=Source 2007|name=LightmappedReflective|dx=dx9}} This shader renders real-time reflection and refractions similar to [[Water (shader)]]. | {{this is a|pixel shader|since=Source 2007|name=LightmappedReflective|dx=dx9}} This shader renders real-time reflection and refractions similar to [[Water (shader)]]. | ||
[[File:Reflectiveglass0000.jpg|thumb|250px|{{code|func_reflective_glass}} (using materials with {{code|LightmappedReflective}} shader)]] | |||
{{warning|All parameters listed in the example (except [[$bumpframe]], [[%tooltexture]] and [[$surfaceprop]]) must be included when used, or [[func_reflective_glass]] may not work properly. {{csgo|4}} additionally requires [[$translucent]].}} | {{warning|All parameters listed in the example (except [[$bumpframe]], [[%tooltexture]] and [[$surfaceprop]]) must be included when used, or [[func_reflective_glass]] may not work properly. {{csgo|4}} additionally requires [[$translucent]].}} |
Revision as of 08:20, 7 November 2024
LightmappedReflective
(DX9 SM2) is a Pixel shader available in all Source games since
Source 2007. This shader renders real-time reflection and refractions similar to Water (shader).






Water
shader (see True reflections under CSS).
Example
The example shown here is materials/glass/reflectiveglass001.vmt
"lightmappedreflective" { "%tooltexture" "dev/flat_normal" "$refracttexture" "_rt_WaterRefraction" "$refractamount" "0" "$refracttint" "[.5 .5 .6]" "$reflecttexture" "_rt_WaterReflection" "$reflectamount" "0" "$reflecttint" "[1 1 1]" "$fresnelpower" "0" "$minreflectivity" "0.8" "$maxreflectivity" "1.0" "$normalmap" "dev/flat_normal" "$surfaceprop" "glass" "$bumpframe" "0" }







Shader parameters
Textures

$basetexture
$normalmap
$bumpframe
$bumptransform
Reflection
$reflecttexture
$reflectamount
$reflecttint
$reflectance
$envmapmask
$minreflectivity
$maxreflectivity
Refraction
$refracttexture
$refractamount
$refracttint