func_reflective_glass

From Source Entities
Jump to navigation Jump to search
A func_reflective_glass reflects almost anything. This one is reflecting env_fire particles, an npc, and the sprites emitted by a held gravity gun.

Code classes:

L4d.png player models break awfully! This model is the same one a player sees when they look down at their legs.

func_reflective_glass is a brush entity present in all Source games. This entity creates reflections which look much clearer than cubemaps, and are done in real-time, meaning they can reflect moving objects. The entity has not been used in most games because it may render the player in an odd fashion when they're in first-person view. Does not work in P2.png.

Bug: The entity may behave oddly if another surface using realtime reflections/refractions such as water, or portals (P1.pngP2.png) are visible/in the PVS.

Tip: In L4d.png onward, the reflection quality can be increased by putting -reflectionTextureSize #### in your launch options.

Only one side of the brush may use the LightmappedReflective shader. The material glass/reflectiveglass001.vmt from Hl2.png should work as-is.

"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"
}

No VTF is required.