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,6 +482,8 @@ public:
//#endif //#endif
break; break;
case 1: //decal case 1: //decal
if(sampler.enabled)
{
u = shader.invu*shader.w; u = shader.invu*shader.w;
v = shader.invv*shader.w; v = shader.invv*shader.w;
texColor = sample(u,v); texColor = sample(u,v);
@ -489,6 +491,7 @@ public:
dst.g = decal_table[texColor.a][texColor.g][shader.materialColor.g]; dst.g = decal_table[texColor.a][texColor.g][shader.materialColor.g];
dst.b = decal_table[texColor.a][texColor.b][shader.materialColor.b]; dst.b = decal_table[texColor.a][texColor.b][shader.materialColor.b];
dst.a = shader.materialColor.a; dst.a = shader.materialColor.a;
} else dst = shader.materialColor;
break; break;
case 2: //toon/highlight shading case 2: //toon/highlight shading
{ {