My current understanding is that the best method involves splitting the original texture into two parts, where one consists of none more than $basetexture, $bumpmap, and $detail (and any subparameters that apply directly to those parameters)
The second part consists of a Lightmappedreflective texture with a clone of the original $basetexture, painted-over in all black. In theory you'd only need an equally-sized black texture but I would argue this is the most foolproof way to go about it.
A couple of noteworthy observations ahead of the rest;
- $basetexture alpha mask does not appear to have any effect on Lightmappedreflective materials
- $alpha, $alphatest do not appear to have any effect on Lightmappedreflective materials
- reflections can only add brightness to a given surface, not subtract it
Description of all relevant parameters;
- $basetexture: The reason I recommend using a masked version of your original basetexture is that it makes alligning the two layers easier, and using a different-resolution black texture will cause your bumpmap to be scaled incorrectly.
- $normalmap: Bumpmap used by Lightmappedreflective to warp both its reflection (and refraction(?)).
- $envmapmask: Per-pixel opacity of reflection
- $translucent: Value appears to have very slight effect on opacity of basetexture. If missing or set to value other than 1 during compilation will break the Reflectiveglass entity.
- $refracttexture (_rt_WaterRefraction): Engine texture used to warp refraction. If missing, material turns opaque.
- $refractamount: Value dictates amount of warping that will be applied to everything [obscured] behind the entity, using $refracttexture. Accepts any value, don't set to anything but 0 for this purpose.
- $refracttint: Colour intensity of everything [obscured] behind the entity, [0 0 0] is black, [1 1 1] is normal. Accepts values of 0 and above.
- $reflecttexture (_rt_WaterReflection): Engine texture used to warp reflection. If missing, entity will not provide reflection.
- $reflectamount: value dictates amount of warping that will be applied to everything reflected by the entity, using $reflecttexture. Accepts any value. Unlike $refractamount, does not appear to boost use of bumpmap.
- $reflecttint: Colour intensity of everything reflected by the entity, [0 0 0] is black, [1 1 1] is normal. Accepts values of 0 and above.
- $fresnelpower: No observed effect.
- $minreflectivity / $maxreflectivity: No observed effect.
- $reflectance: Opacity of reflection. Pair low values with high $reflecttint values and vice-versa for best effect.
An example of a floor using this method:
$basetexture "tk_custom/legacy-vtf/tiles_b_dark" /// edit of tile/hr_t/tiles_b
$detailscale "[5 5 5]"
$color "[1 .9 .9]"
$basetexture "tk_custom/legacy-vtf/tiles_b_dark-black2" /// black-masked version of actual basetexture
$envmapmask "tk_custom/legacy-vtf/tiles_b_envmask" /// alpha mask of tile/hr_t/tiles_b_normals
$refracttint "[1 1 1]"
$reflecttint "[1 1 1]"
Of course my previous method is still usable, with the upside of being much easier to use with surfaces made up of multiple textures, or blended textures. Downside being the reflections are less complex.
$refracttint "[1 1 1]"
$reflecttint "[.25 .25 .25]"
Both methods involve building a flat floor out of displacements, and using the "Raise to" option of the geometry painting tool to set the whole thing to -0.15, the smallest less-than-0 value that will not be rounded up to 0 and subsequently cause z-fighting. In all honesty I'm not sure if the compiler doesn't just round it down to -0.5 but hey who cares.
Next step is obviously to place the func_reflectiveglass at the same level as the floor (was). Disable shadows, receiving shadows, etc on the entity. You can make the func_reflectiveglass out of multiple blocks, just so long the reflective faces are all on the same 2-dimensional plane.
As far as I know, multiple seperate func_reflectiveglass entities may be within the same visleaf, just long - once again - they're all on the same plane.
Supposedly ragdolls and func_reflectiveglass don't have collision to oneanother, so if you care a lot about ragdolls not clipping -0.15 HU into the ground you can disable solidity and place a clip brush to act as the actual floor.