Re: [Algorithms] RGBE filtering
Brought to you by:
vexxed72
From: Wolfgang E. <wol...@gm...> - 2007-02-08 04:45:19
|
Hi Tony, what you might want to check out is a combination of DXT1 + L16 texture maps. The alpha == exponent is stored in a quarter size L16 texture. Bilinear filtering should show the same results so. Another trick is to store a common bias and scale value per color channel per texture in the DXT header. You need to find some unoccupied space so. This works with bilinear filtering and looks especially with light maps nice. - Wolf On 2/7/07, Tony Albrecht <ton...@gm...> wrote: > Hi, > I'm trying to render lightmaps in a scene which have a high range of > precision (and they include colour). I want to be able to scale the lightmap > intensity up or down to allow very dark areas to become well lit or darker > as required. > > As a first pass I've tried a basic RGBE format for the lightmap texture, > passing it in as a RGBA (8 bits per channel) texture and then using a pixel > shader to convert the RGBE value to floating point precision. Image size is > a concern so I then converted the RGBA image to a DXT5. I analysed each 4x4 > block and chose an exponent based on those 16 values rather than each pixel > to avoid compression artifacts due to interpolated alpha (exponents). This > works pretty well except that I get the occasional sub-texel band through > the final image, in particular, around regions which span high contrast > variations (shadow edges). (See attachment) > > This is due (I think) to the bilinear filtering that occurs before the pixel > shader receives the fragment for processing and blending the exponents which > vary significantly between neighbouring 4x4 blocks. Everything looks fine > (but blocky) when I drop the bilinear filtering. > > I've tried to preprocess the texture to minimise the exponent differences > between 4x4 blocks, but this has been entirely unsuccessful. > > The only option I can see is to do the bilinear filtering manually, reading > in the neighbouring texels and converting the RGBE to floats before the > interpolation. > > Is there another solution which doesn't require significant pixel shader > work? Is there another HDR format that I should be looking at that will give > me the precision I want with minimal memory use? > > Thanks, > -Tony > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > |