WindowImposter
Jump to navigation
Jump to search
Note: In first-party games, it only accepts $envmap.
Garry's Mod accepts extra parameters, such as $alpha.
Warning: Custom cubemaps will have broken/corrupted colors on HDR lighting if you don't have a HDR version supplied. To fix this, you must generate a HDR version of your cubemap/skybox texture. Name this HDR version the same as your normal texture, but add
Warning: This shader only works on brushes and displacements.
Workaround: For studio models, use VertexLitGeneric without a
Confirm:Does UnlitGeneric work as well?
This article or section is a stub. You can help by expanding it.
WindowImposter is a Vertex shader available in all
Source games.
It displays an $envmap which is drawn regardless of user settings such as mat_specular.
- Todo: Any other parameters? Do branches have extra parameters as well?
The faces orientation isn't taken into account when reflecting the cubemap, which makes it very convenient for making windows/doors that hide everything behind them while looking like they aren't, as well as faking having multiple simultaneous skyboxes.
In
Half-Life 2, WindowImposter is used by the material dev/dev_windowportal.vmt, and used extensively on func_illusionary and func_brush entities in conjunction with func_areaportalwindow to reduce the amount of geometry rendered in outside areas.
.hdr to the name. This texture needs to be in RGBA16161616F format. For example if your cubemap is named mystuff/coolsky.vtf, you should have the HDR version named as mystuff/coolsky.hdr.vtf. The game will automatically load the HDR version and fallback to the normal texture for LDR clients. $basetexture. The material will be unlit if $basetexture is omitted. Example VMT
WindowImposter
{
"$envmap" "space/space_envmap"
}See the $envmap page for instructions on creating custom $envmaps for this shader.