PDA

View Full Version : Cel Shade



urgent buzzard
12th February 2004, 23:48
Here is the cel texture code:



void LoadTex(void)
{
GLuint shaderTexture[1];
GLubyte CelShadeDate[16] = {120, 120, 150, 150, 150, 160,160, 255,255, 255, 255, 255, 255, 255, 255, 255};
(*orig_glGenTextures)(1, &shaderTexture[0]);
(*orig_glEnable)(GL_TEXTURE_1D);
(*orig_glBindTexture)(GL_TEXTURE_1D, shaderTexture[0]);
(*orig_glTexParameteri)(GL_TEXTURE_1D,GL_TEXTURE_M AG_FILTER, GL_NEAREST);
(*orig_glTexParameteri)(GL_TEXTURE_1D,GL_TEXTURE_M IN_FILTER, GL_NEAREST);
(*orig_glTexImage1D)(GL_TEXTURE_1D, 0, GL_RGBA, 16, 0,GL_LUMINANCE, GL_UNSIGNED_BYTE, CelShadeDate);
}


One of the problems is that misc. textures from the map and gui are displayed on the walls, menus, ect.
The other problem is that the texture only looks good on a few models.

EDIT: nvm got it working

Here is a pic:

LouCypher
13th February 2004, 19:23
I don't know what game that is but the effect looks funny as hell. Good job.

bart S.
13th February 2004, 22:51
its medal of honor allied assault and the effect is verry nice :classic:

PAS3I2
13th February 2004, 23:14
thats cool man, nice job again :)