Warshade
11-04-2008, 10:37 AM
Hello,
are there any 32-Bit (per Texel) Texture Formats for storing HDR color that are well suited to be used as both: FBO Attachment and Samplers? I'm not too worried about backwards compatibilty (DirectX 10 hardware can be expected), but I'd like to know if someone found a better solution than using 64-Bit Textures.
The answer appears to be so straightforward that I cannot get rid of the feeling to overlook something. I've made it a spoiler so you may chose not being influenced by it when looking for a solution.
<div class="ubbcode-block"><div class="ubbcode-header">Warning, Spoiler: <input type="button" class="form-button" value="Show" onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" />]<div style="display: none;">
R11f G11f B10f - This appears to be the best fit.
RGB9e5 - Can only be used as Sampler, according to spec. :( Any insider info whether this changes at some point?
RGBe8 - internally using RGBA8. Not native to GL, but you could probably treat the RGB values as mantissa and use the alpha channel as a shared exponent and pack/unpack with GLSL when writing/reading. This would be very fragile and is probably not a good idea.
Some other possibilities considered but abandoned as "worse than the ones above"
RGBA8 - treating Alpha as Intensity as proposed in http://www.guerrilla-games.com/publications/dr_kz2_rsx_dev07.pdf
RGB10A2 - internally stored as RGBA8 according to http://http.download.nvidia.com/developer/OpenGL_Texture_Formats/nv_ogl_texture_formats.pdf
[/QUOTE]</div>
are there any 32-Bit (per Texel) Texture Formats for storing HDR color that are well suited to be used as both: FBO Attachment and Samplers? I'm not too worried about backwards compatibilty (DirectX 10 hardware can be expected), but I'd like to know if someone found a better solution than using 64-Bit Textures.
The answer appears to be so straightforward that I cannot get rid of the feeling to overlook something. I've made it a spoiler so you may chose not being influenced by it when looking for a solution.
<div class="ubbcode-block"><div class="ubbcode-header">Warning, Spoiler: <input type="button" class="form-button" value="Show" onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" />]<div style="display: none;">
R11f G11f B10f - This appears to be the best fit.
RGB9e5 - Can only be used as Sampler, according to spec. :( Any insider info whether this changes at some point?
RGBe8 - internally using RGBA8. Not native to GL, but you could probably treat the RGB values as mantissa and use the alpha channel as a shared exponent and pack/unpack with GLSL when writing/reading. This would be very fragile and is probably not a good idea.
Some other possibilities considered but abandoned as "worse than the ones above"
RGBA8 - treating Alpha as Intensity as proposed in http://www.guerrilla-games.com/publications/dr_kz2_rsx_dev07.pdf
RGB10A2 - internally stored as RGBA8 according to http://http.download.nvidia.com/developer/OpenGL_Texture_Formats/nv_ogl_texture_formats.pdf
[/QUOTE]</div>