Talk:Reflective Materials

From Valve Developer Community
Jump to: navigation, search

This page says back is no reflection and white is full reflection. But when the aplhachannel of the base texture is used, it seems that its the other way around?

(anyone knows how this is when the alpha of the normal is used as reflection mask?)

Also when using a seperate mask texture, there is no need for a env_tint value?

(I notice the hl2/glass textures use seperate masks and no tints, while the hl2/metal textures always have envmaptint values.)

--Bluestrike 04:55, 8 Apr 2007 (PDT)

The tint ia applied to whatever the mask specifies, so one doesn't neccisarily remove the need for the other. --Angry Beaver 13:43, 8 Apr 2007 (PDT)

LightmappedGeneric does not support vertex format

It seems to me that the examples don't work. When I used the LightmappedGeneric shader I got this error in the console whenever the mesh using it was visible:

Material models/reflective does not support vertex format used by the mesh (maybe missing fields or mismatched vertex compression?), mesh will not be rendered. Grab a programmer!

I have to guess that it's because there is no normal data for each vertex, as it's not needed for pre-lit surfaces. I switched the shader to VertexLitGeneric and it was fine. Maybe the article should be changed.

LightmappedGeneric only works for map brushes, which is why it's named LightmappedGeneric, not VertexlitGeneric. Solokiller 01:47, 18 Jun 2008 (PDT)

$envmap for custom textures doesn't work

Whever I add the line "$envmap" "env_cubemap" to a custom texture, I invariably get a purple/black checkerboard. This happens with or without alpha channels, masks, buildcubemaps and the like. Does anybody else have this? Spekkeh 05:54, 20 Jun 2008 (PDT)