Humm it makes sense .

Another case which is for u_ambient , if we add if ((gstate.materialupdate & 1) == 0) , it breaks grahpic again like the case in u_matspecular .so i am wondering if would be better to declare all athough may affect performance