Reduced the number of redundant vertex shader compilations (possibly to zero).

That one was almost too easy ;P
This commit is contained in:
NeoBrainX 2011-08-31 20:46:03 +02:00
parent 4137f287fd
commit bcb8d11c1b

View File

@ -37,7 +37,7 @@ void GetVertexShaderId(VERTEXSHADERUID *uid, u32 components)
(xfregs.numChan.numColorChans << 27) |
(xfregs.dualTexTrans.enabled << 29);
for (int i = 0; i < 2; ++i) {
for (int i = 0; i < xfregs.numChan.numColorChans; ++i) {
uid->values[1+i] = xfregs.color[i].enablelighting ?
(u32)xfregs.color[i].hex :
(u32)xfregs.color[i].matsource;