OpenGL2: Store vertex colors and hdr lightmaps/lightgrid as RGBA16.
This commit is contained in:
parent
239f539702
commit
aa79738c50
15 changed files with 240 additions and 184 deletions
|
@ -54,10 +54,10 @@ static void LerpDrawVert( srfVert_t *a, srfVert_t *b, srfVert_t *out ) {
|
|||
out->lightmap[0] = 0.5f * (a->lightmap[0] + b->lightmap[0]);
|
||||
out->lightmap[1] = 0.5f * (a->lightmap[1] + b->lightmap[1]);
|
||||
|
||||
out->vertexColors[0] = 0.5f * (a->vertexColors[0] + b->vertexColors[0]);
|
||||
out->vertexColors[1] = 0.5f * (a->vertexColors[1] + b->vertexColors[1]);
|
||||
out->vertexColors[2] = 0.5f * (a->vertexColors[2] + b->vertexColors[2]);
|
||||
out->vertexColors[3] = 0.5f * (a->vertexColors[3] + b->vertexColors[3]);
|
||||
out->color[0] = ((int)a->color[0] + (int)b->color[0]) >> 1;
|
||||
out->color[1] = ((int)a->color[1] + (int)b->color[1]) >> 1;
|
||||
out->color[2] = ((int)a->color[2] + (int)b->color[2]) >> 1;
|
||||
out->color[3] = ((int)a->color[3] + (int)b->color[3]) >> 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue