LWJGL Forum

Programming => OpenGL => Topic started by: royger on May 30, 2007, 01:31:29

Title: Convert framebuffer image to black and white
Post by: royger on May 30, 2007, 01:31:29
Hello,

I'm interested in rendering some sequences of a game in black and white, and I would like to know if there is any way to apply some kind of "filter" to the framebuffer in order to convert the image to black and white.

Thanks, Roger.
Title: Re: Convert framebuffer image to black and white
Post by: bobjob on May 30, 2007, 10:29:20
an easy way of making all your textures grey scale (not black and white)

if your using devil to load images
use

  IL.ilConvertImage(IL.IL_LUMINANCE, IL.IL_BYTE);


and

  GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, textureWidthSize, textureHeightSize,
                    0, GL11.GL_LUMINANCE, GL11.GL_UNSIGNED_BYTE, imageData);


notice the LUMINANCE statements instead of RGBA

hope someone knows a way to make a scene black and white, wouldnt mind one day playing around with the effect
Title: Re: Convert framebuffer image to black and white
Post by: Fool Running on June 04, 2007, 17:20:05
You might have to use a shader to produce a fullscreen black and white effect.