Can somebody tell me how can I apply default colors to vec4_t?
I mean, if I want to get white color( RGB: 255, 255, 255 ), I have to use
vec4_t mycolor = { 1.0f, 1.0f, 1.0f, 1.0f }
But why it’s so?
Can somebody tell me how can I apply default colors to vec4_t?
I mean, if I want to get white color( RGB: 255, 255, 255 ), I have to use
vec4_t mycolor = { 1.0f, 1.0f, 1.0f, 1.0f }
But why it’s so?
I guess as in OpenGL: 0.0f (0 as an float) is no color, 1.0f is full color.
http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml
Doc says that:
vec4_t( float x, float y, float z, float dist );
...
ID_INLINE vec4_t::vec4_t( float x, float y, float z, float dist ) {
this->x = x;
this->y = y;
this->z = z;
this->dist = dist;
}
But I noticed somewhere in ET SDK RGB color usages,I think it was at limbo panel,dont remeber…
vec4_t some color;
if(somecase==something) {
color[0] = 255;
color[1] = 255;
color[2] = 255;
color[3] = 1;
}
Anyway I’m waiting PM from RR2DO2 for futher information…
its rgba and normalized values and all values are floats. E.g. 255 = 1.0, 0 = 0.0 127=.5
and the opacity should be obvious.
edit: q3ase can make the colors… check the fogparms.
{ 1.0, 0.501961, 0, 1 }
Gives a nice orange.
And .f is float, thought it would be better to use double …
X/256: x.xf
Also:
{ 0.39f, 0.5f, 0.12f, 0.35f }
PS: dont forgot the f after the numbers 