overbrighting textures ?
hi, i want to overbright the textures I load to get more brightness with shadowmapping.
How do you, should i, overbright the textures ?
Are there any examples ?
Anything that requires finding convex hulls in realtime isstarting to sound like a bad idea. -- John Carmack
u can manually overbright the textures yourself (ala quake3) or perhaps use gl_add_signed_ARB when u add the shadows
http://uk.geocities.com/sloppyturds/gotterdammerung.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html
You can adapt this code:
c is the image data in bytes, w is the texture width, h is the texture height, bpp is the bytes per pixel, 3 for RGB, or 4 for RGBA.
This code was taken directly out of the lightmapping example here
Use it BEFORE you generate the textures in OpenGL.
"To err is human, to really mess up requires a computer"
[edited by - Lukerd on May 15, 2002 9:07:50 AM]
void AdjustColor(byte *c, int w, int h, int bpp){ int end = w * h * bpp; for (int j = 0; j < end; j++, c++) *c = (*c >= 128) ? 255 : *c * 2;}
c is the image data in bytes, w is the texture width, h is the texture height, bpp is the bytes per pixel, 3 for RGB, or 4 for RGBA.
This code was taken directly out of the lightmapping example here
Use it BEFORE you generate the textures in OpenGL.
"To err is human, to really mess up requires a computer"
[edited by - Lukerd on May 15, 2002 9:07:50 AM]
"To err is human, to really mess up requires a computer"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement