UnlitTwoTexture Not Working in Left 4 Dead

ok, I don’t know much on programming. I am using someones code that was working in Half-Life 2. I tried importing it into Left 4 Dead and I get the following error…

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

So I’m here to Grab a programmer I guess.

Now by what I found out.

UnlitTwoTexture Shader does not work well by what valve developer site told me. But they did not including any other information on how to get it to work another way. They hint it but I still don’t know.

Valve Hinting it? > developer.valvesoftware.com

and…

developer.valvesoftware.com

UnlitTwoTexture = Two textures are mixed evenly and appear at full brightness.

Anyways, below is the code for the material file. Hopefully someone can help me to get this to work? Sense I know nothing about it.

I am basically making a hologram like display with no quality loss and this method below seems to work in HL2, unless there is another method that is fast and easy.

The Material is tied to the model.

[code]
“UnlitTwoTexture_DX6”
{
“$basetexture” “game/Models/doors/gui/gui_locked_restore_power”
“$surfaceprop” “glass”
“$texture2” “dev/dev_scanline”
“$vertexcolor” 1

"$model"		1
"$additive"	1
"$nocull"		1

"$one"		1
"$zero"		0
"$temp"		0
"$texoffset"	"[0 0]"
"$texscale"	.25
"$tex2offset"	"[0 0]"
"$tex2scale"	0

"$a_b_halfwidth" 	0.1
"$a_b_noise"		0

"$a_s_halfwidth" 	0.025
"$a_s_noise"		0

"$a_t_halfwidth" 	0.00
"$a_threshold"		0.7

"$alpha_bias"		0.2

//
“$j_b_halfwidth” 2
“$j_b_noise” 0

"$j_s_halfwidth" 	0.05
"$j_s_noise"		0

"$j_t_halfwidth" 	0.25
"$j_threshold"		3

"$j_basescale"		2

//
“$xo_b_halfwidth” 0.035
“$xo_b_noise” 0

"$xo_s_halfwidth" 	0.001
"$xo_s_noise"		0

"$xo_t_halfwidth" 	0.0
"$xo_threshold"		0.1




"Proxies"
{

	"Sine"
	{
		"resultVar" "$color[0]"
		"sineperiod" 1
		"sinemin" .9
		"sinemax" .9
	}
	"Sine"
	{
		"resultVar" "$color[1]"
		"sineperiod" .01
		"sinemin" .9
		"sinemax" 1
	}

// alpha noise

	"GaussianNoise"
	{
		"mean"	"$zero"
		"halfwidth"	"$a_b_halfwidth"
		"resultVar"	"$a_b_noise"
	}
	"Abs"
	{
		"srcVar1"	"$a_b_noise"
		"resultVar"	"$a_b_noise"
	}
	"Subtract"
	{
		"srcvar1"	"$one"
		"srcvar2"	"$a_b_noise"
		"resultvar"	"$a_b_noise"
	}
	"GaussianNoise"
	{
		"mean"	"$zero"
		"halfwidth"	"$a_s_halfwidth"
		"resultVar"	"$a_s_noise"
	}
	"Abs"
	{
		"srcVar1"	"$a_s_noise"
		"resultVar"	"$a_s_noise"
	}
	"Subtract"
	{
		"srcvar1"	"$one"
		"srcvar2"	"$a_s_noise"
		"resultvar"	"$a_s_noise"
	}
	"GaussianNoise"
	{
		"mean"	"$a_threshold"
		"halfwidth"	"$a_t_halfwidth"
		"resultVar"	"$a_threshold"
	}
	"LessOrEqual"
	{
		"srcVar1"	"$a_b_noise"
		"srcVar2"	"$a_threshold"
		"lessEqualVar"	"$a_b_noise"
		"greaterVar"	"$a_s_noise"
		"resultVar"	"$temp"
	}

// interlace noise

	"GaussianNoise"
	{
		"mean"	"$zero"
		"halfwidth"	"$j_b_halfwidth"
		"resultVar"	"$j_b_noise"
	}
	"GaussianNoise"
	{
		"mean"	"$zero"
		"halfwidth"	"$j_s_halfwidth"
		"resultVar"	"$j_s_noise"
	}
	"GaussianNoise"
	{
		"mean"	"$j_threshold"
		"halfwidth"	"$j_t_halfwidth"
		"resultVar"	"$j_threshold"
	}
	"Abs"
	{
		"srcVar1"	"$j_b_noise"
		"resultVar"	"$temp"
	}
	"LessOrEqual"
	{
		"srcVar1"	"$temp"
		"srcVar2"	"$j_threshold"
		"lessEqualVar"	"$j_s_noise"
		"greaterVar"	"$j_b_noise"
		"resultVar"	"$temp"
	}
	"Add"
	{
		"srcvar1"	"$temp"
		"srcvar2"	"$j_basescale"
		"resultvar"	"$tex2scale"
	}

// debug
// “Equals”
// {
// “resultvar” “$alpha”
// “srcvar1” “$one”
// }

	"TextureTransform"
	{
		"translateVar" "$texoffset"
		"resultVar" "$basetexturetransform"
	}

// interlacing

	"LinearRamp"
	{
		"resultVar" "$tex2offset[1]"
		"rate" -.91
	}

	"TextureTransform"
	{

// “scaleVar” “$tex2scale”
“translateVar” “$tex2offset”
“resultVar” “$texture2transform”
}
}
}[/code]

Well, I got it fix by myself. I this changed the first line to “MonitorScreen” and now it works in Left 4 Dead. Took several hours to figure out and I was this messing around. Anyone else could use the code above to make models look like a hologram. I believe it keeps a high brightness.

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.