PDA

View Full Version : downsampling floating-point NPOT textures



mogumbo
04-14-2005, 12:42 PM
Does anyone have any recommendations for downsampling NPOT textures? Mipmapping isn't supported for these, which would be the easy way to do it. Yes, I'm interested in using this for tone mapping and other effects associated with scenes prerendered to floating-point NPOT textures.

michael.bauer
04-14-2005, 01:00 PM
Hi,

I think mipmapping is indeed supported for NPOT textures, also for float16 textures. AFAIK the nvidia 6 cards do support this. Mipmapping for NPOT should be described in one of the extension specs, so you could read there how it should be done, there should even be some formulas there how mipmaps are handled and generated the right way.

Jan
04-14-2005, 03:45 PM
Yes, mipmaps ARE supported for NPOT textures. NPOT-textures can do everything POT-texture can do, thatīs the nice thing about this spec.

What you mean are rectangle-textures. Those donīt support mipmapping (and several other things).

Jan.

Zengar
04-15-2005, 12:39 AM
The fastest way to downsample a rectangle texture is using a fragment program. Just create a smaller texture as an output and draw a box-filtered fullscreen rectangle with the large texture on it.

mogumbo
04-15-2005, 06:10 AM
Yes, you're right, I meant rectangular textures.