mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-01-23 00:10:50 +00:00
Upped particle texture from 4*4 mono blotch to 16*16 grayscale circle. Looks dramatically better, and actually seems a hair faster here.
This commit is contained in:
parent
733d55603c
commit
37ba8cabb3
1 changed files with 22 additions and 10 deletions
|
@ -48,18 +48,30 @@ GDT_Init (void)
|
||||||
GDT_InitSmokeParticleTexture ();
|
GDT_InitSmokeParticleTexture ();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte dottexture[4][4] = {
|
byte dottexture[16][16] = {
|
||||||
{0, 1, 1, 0},
|
{0, 0, 0, 0, 56, 151, 217, 250, 250, 217, 151, 56, 0, 0, 0, 0},
|
||||||
{1, 1, 1, 1},
|
{0, 0, 0, 151, 255, 255, 255, 255, 255, 255, 255, 255, 151, 0, 0, 0},
|
||||||
{1, 1, 1, 1},
|
{0, 0, 184, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 184, 0, 0},
|
||||||
{0, 1, 1, 0},
|
{0, 151, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 151, 0},
|
||||||
|
{56, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 56},
|
||||||
|
{151, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 151},
|
||||||
|
{217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 217},
|
||||||
|
{250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250},
|
||||||
|
{250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250},
|
||||||
|
{217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 217},
|
||||||
|
{151, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 151},
|
||||||
|
{56, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 56},
|
||||||
|
{0, 151, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 151, 0},
|
||||||
|
{0, 0, 184, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 184, 0, 0},
|
||||||
|
{0, 0, 0, 151, 255, 255, 255, 255, 255, 255, 255, 255, 151, 0, 0, 0},
|
||||||
|
{0, 0, 0, 0, 56, 151, 217, 250, 250, 217, 151, 56, 0, 0, 0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GDT_InitDotParticleTexture (void)
|
GDT_InitDotParticleTexture (void)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
byte data[4][4][4];
|
byte data[16][16][4];
|
||||||
|
|
||||||
//
|
//
|
||||||
// particle texture
|
// particle texture
|
||||||
|
@ -67,15 +79,15 @@ GDT_InitDotParticleTexture (void)
|
||||||
part_tex_dot = texture_extension_number++;
|
part_tex_dot = texture_extension_number++;
|
||||||
glBindTexture (GL_TEXTURE_2D, part_tex_dot);
|
glBindTexture (GL_TEXTURE_2D, part_tex_dot);
|
||||||
|
|
||||||
for (x = 0; x < 4; x++) {
|
for (x = 0; x < 16; x++) {
|
||||||
for (y = 0; y < 4; y++) {
|
for (y = 0; y < 16; y++) {
|
||||||
data[y][x][0] = 244;
|
data[y][x][0] = 244;
|
||||||
data[y][x][1] = 244;
|
data[y][x][1] = 244;
|
||||||
data[y][x][2] = 244;
|
data[y][x][2] = 244;
|
||||||
data[y][x][3] = dottexture[x][y] * 244;
|
data[y][x][3] = dottexture[x][y];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format, 4, 4, 0, GL_RGBA,
|
glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format, 16, 16, 0, GL_RGBA,
|
||||||
GL_UNSIGNED_BYTE, data);
|
GL_UNSIGNED_BYTE, data);
|
||||||
|
|
||||||
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
|
|
Loading…
Reference in a new issue