case CM_COLOR_DOT_PRODUCT_SCALE:
c = DotProduct( dv->normal, cm2->data );
- c = cm2->data[4] + c * (cm2->data[5] - cm2->data[4]);
+ c = (c - cm2->data[3]) / (cm2->data[4] - cm2->data[3]);
VectorSet( mult, c, c, c );
break;
case CM_ALPHA_DOT_PRODUCT_SCALE:
c = DotProduct( dv->normal, cm2->data );
- c = cm2->data[4] + c * (cm2->data[5] - cm2->data[4]);
+ c = (c - cm2->data[3]) / (cm2->data[4] - cm2->data[3]);
mult[ 3 ] = c;
break;
case CM_COLOR_DOT_PRODUCT_2_SCALE:
c = DotProduct( dv->normal, cm2->data );
c *= c;
- c = (c - cm2->data[4]) / (cm2->data[5] - cm2->data[4]);
+ c = (c - cm2->data[3]) / (cm2->data[4] - cm2->data[3]);
VectorSet( mult, c, c, c );
break;
case CM_ALPHA_DOT_PRODUCT_2_SCALE:
c = DotProduct( dv->normal, cm2->data );
c *= c;
- c = (c - cm2->data[4]) / (cm2->data[5] - cm2->data[4]);
+ c = (c - cm2->data[3]) / (cm2->data[4] - cm2->data[3]);
mult[ 3 ] = c;
break;
else if( !Q_stricmp( token, "dotProductScale" ) )
{
cm->type = CM_COLOR_DOT_PRODUCT_SCALE + alpha;
- Parse1DMatrixAppend( shaderText, 3, cm->data );
+ Parse1DMatrixAppend( shaderText, 5, cm->data );
}
/* dotProduct2 ( X Y Z ) */