Func reflective glass: Difference between revisions
Jump to navigation
Jump to search
Note:This entity will not show a player their own reflection in first person (except in
), but it will render all player models that are actually being drawn.
Note:This entity may be constructed from more than one brush, but all LightmappedReflective faces must be on the same
plane to work as intended.
Bug:This entity will always be drawn in front of translucent textures, including particles and sprites. [todo tested in ?]
Bug:This entity will cease to render or cause visual artifacts if expensive water and or func_areaportals are in a visible visleaf (meaning they can see each other). [todo tested in ?]
Bug:If more than one face of this brush entity contain a reflective or translucent texture, then the mirror's behavior will suddenly switch depending on one's perspective. To prevent this, make sure exactly one surface has the reflective texture. All others must be opaque. [todo tested in ?]
Bug:In
Portal, unless
Warning:In
Black Mesa, LightmappedReflective doesn't work (shows wireframe instead of surface with reflection). Despite this, the entity still creates the reflection camera. This means that it still can heavy reduce performance. Don't use this entity in the game.
Tip:To keep the framerate high, use triggers to disable the entity while not needed.
Note:All
m (Took out the shader icon template. Feels like it pops out too much, especially next to other colours. Added youtube tutorial to link) |
(otherkio) |
||
Line 22: | Line 22: | ||
{{warning|In {{bms|2}}, [[LightmappedReflective]] doesn't work (shows [[wireframe]] instead of surface with reflection). Despite this, the entity still creates the reflection camera. This means that it still can heavy reduce performance. Don't use this entity in the game.}} | {{warning|In {{bms|2}}, [[LightmappedReflective]] doesn't work (shows [[wireframe]] instead of surface with reflection). Despite this, the entity still creates the reflection camera. This means that it still can heavy reduce performance. Don't use this entity in the game.}} | ||
{{Tip|To keep the framerate high, use [[trigger]]s to disable the entity while not needed.}} | {{Tip|To keep the framerate high, use [[trigger]]s to disable the entity while not needed.}} | ||
{{ | {{OtherKIO|func_brush|All}} | ||
== See also == | == See also == | ||
*[[LightmappedReflective]], the material shader used for this entity. | *[[LightmappedReflective]], the material shader used for this entity. | ||
* {{youtube|5NJMh5O-lIQ|page=watch|YouTube tutorial: How to make a mirror}} | * {{youtube|5NJMh5O-lIQ|page=watch|YouTube tutorial: How to make a mirror}} | ||
* {{ent|prop_mirror}} {{portal2|only|addtext={{p2ce}}}}: an alternate method of creating an albeit simple real-time reflection | * {{ent|prop_mirror}} {{portal2|only|addtext={{p2ce}}}}: an alternate method of creating an albeit simple real-time reflection |
Revision as of 13:48, 30 June 2024
![]() |
---|
CFuncReflectiveGlass |
![]() |
func_reflective_glass
is a brush entity available in all Source games.
Entity description
It is used to produce perfectly reflective glass that renders world + entities. You must use a LightmappedReflective texture (glass/reflectiveglass001.vmt
is a good start) on one side of the brush, and the rest of the sides either nodraw or some other opaque texture for this to work properly.
It is functionally identical to expensive water shaders, but typically used with opaque, flat materials.









r_portal_stencil_depth
is set to 0 (which disables portal rendering):
- Having linked portals present near the mirror, or if they are present anywhere within the players' view range (even if they are not being reflected) will cause heavy visual artifacts. The effects are more intense if more portals are reflected and/or more portals are within the players' view range.
- The view through portals renders incorrectly or not at all when viewed through a mirror.
- If a mirror is viewed through a portal, the mirror will still reflect based on the players' absolute position rather than the relative position from the other portal, which causes the mirror to display inaccurately.
- If
r_portal_stencil_depth
is greater than 2, the game may crash when attempting to look through portals that can see each other and the mirror.




Keyvalues / Inputs / Outputs
are same as func_brush.See also
- LightmappedReflective, the material shader used for this entity.
YouTube tutorial: How to make a mirror
- prop_mirror (only in
): an alternate method of creating an albeit simple real-time reflection