Bug in ClipMapEffects.cs
by Scott Goodwin · in Torque X 3D · 05/24/2009 (8:06 pm) · 2 replies
In ClipMapEffects.cs there seems to be a bug when texturesUsed is 3. In two places (each shader model), the test has 1 instead of 3 so ClipMap3_2_lit and ClipMap3_1 will never be selected. Here's the snippet:
// choose a technique.
if (_isLightingEnabled && srs.Gfx.ShaderProfile >= ShaderProfile.PS_2_0)
{
// select a shader model 2 technique with lighting
if (texturesUsed == 1)
return "ClipMap1_2_lit";
else if (texturesUsed == 2)
return "ClipMap2_2_lit";
else if (texturesUsed == 1) // sdg: I think this should be 3
return "ClipMap3_2_lit";
else
return "ClipMap4_2_lit";
}
else
{
// select a shader model 1 technique (no terrain lighting)
if (texturesUsed == 1)
return "ClipMap1_1";
else if (texturesUsed == 2)
return "ClipMap2_1";
else if (texturesUsed == 1) // sdg: I think this should be 3
return "ClipMap3_1";
else
return "ClipMap4_1";
}About the author
Torque Owner Nanomid
http://www.stringtemplate.org/