sun->color[ 1 ] = atof( token );
GetTokenAppend( shaderText, qfalse );
sun->color[ 2 ] = atof( token );
+
+ if(colorsRGB)
+ {
+ sun->color[0] = Image_LinearFloatFromsRGBFloat(sun->color[0]);
+ sun->color[1] = Image_LinearFloatFromsRGBFloat(sun->color[1]);
+ sun->color[2] = Image_LinearFloatFromsRGBFloat(sun->color[2]);
+ }
/* normalize it */
VectorNormalize( sun->color, sun->color );
si->color[ 1 ] = atof( token );
GetTokenAppend( shaderText, qfalse );
si->color[ 2 ] = atof( token );
+ if(colorsRGB)
+ {
+ si->color[0] = Image_LinearFloatFromsRGBFloat(si->color[0]);
+ si->color[1] = Image_LinearFloatFromsRGBFloat(si->color[1]);
+ si->color[2] = Image_LinearFloatFromsRGBFloat(si->color[2]);
+ }
ColorNormalize( si->color, si->color );
}
si->floodlightIntensity = atof( token );
GetTokenAppend( shaderText, qfalse );
si->floodlightDirectionScale = atof( token );
+ if(colorsRGB)
+ {
+ si->floodlightRGB[0] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[0]);
+ si->floodlightRGB[1] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[1]);
+ si->floodlightRGB[2] = Image_LinearFloatFromsRGBFloat(si->floodlightRGB[2]);
+ }
+ VectorNormalize(si->floodlightRGB);
}
/* jal: q3map_nodirty : skip dirty */
{
cm->type = CM_COLOR_SET;
Parse1DMatrixAppend( shaderText, 3, cm->data );
+ if(colorsRGB)
+ {
+ cm->data[0] = Image_LinearFloatFromsRGBFloat(cm->data[0]);
+ cm->data[1] = Image_LinearFloatFromsRGBFloat(cm->data[1]);
+ cm->data[2] = Image_LinearFloatFromsRGBFloat(cm->data[2]);
+ }
}
/* alpha scale A */