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