Advertisement

overbrighting textures ?

Started by May 13, 2002 11:55 AM
1 comment, last by stryx 22 years, 9 months ago
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
Advertisement
You can adapt this code:


    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