rasterizer: apparently decal needs a special case for texture-disable after all.

This commit is contained in:
zeromus 2010-07-07 05:12:09 +00:00
parent 49689be1ce
commit 84bfa26bc7
1 changed files with 10 additions and 7 deletions

View File

@ -482,13 +482,16 @@ public:
//#endif
break;
case 1: //decal
u = shader.invu*shader.w;
v = shader.invv*shader.w;
texColor = sample(u,v);
dst.r = decal_table[texColor.a][texColor.r][shader.materialColor.r];
dst.g = decal_table[texColor.a][texColor.g][shader.materialColor.g];
dst.b = decal_table[texColor.a][texColor.b][shader.materialColor.b];
dst.a = shader.materialColor.a;
if(sampler.enabled)
{
u = shader.invu*shader.w;
v = shader.invv*shader.w;
texColor = sample(u,v);
dst.r = decal_table[texColor.a][texColor.r][shader.materialColor.r];
dst.g = decal_table[texColor.a][texColor.g][shader.materialColor.g];
dst.b = decal_table[texColor.a][texColor.b][shader.materialColor.b];
dst.a = shader.materialColor.a;
} else dst = shader.materialColor;
break;
case 2: //toon/highlight shading
{