The options are intended to match the existing read options. By default it will only write RGB32F format; if the "RAW" option is selected, it will output 8 bit RGBA as "raw" RGBE. Note also that the writer inserts a flipVertical(); although the RGBE format, according to spec, should support top-to-bottom or bottom-to-top ordering, no software I've found, including that from the formats originator, actually respects this."
completed the new registration of the plugin-readerwriters
("REGISTER_OSGPLUGIN") according to your osgstaticviewer-example (see
attachment, based on today's svn)."
"I add a new option in the HDR Reader.
The RAW option store the RGBE values into a Image, to use
this option you need to decode the RGBE value in the frag-
ment shader. Follow the cube map glsl decoder:
vec4 textureCubeRGBE( uniform samplerCube sampler, vec3 coords )
{
ivec4 rgbe = textureCube( sampler, coords ) * 255. + 0.5;
float e = rgbe.a - ( 128 + 8 );
return vec4( rgbe.rgb * exp2( e ), 1.0 );
}
This option is usefull for who have a outdate hardware like
FX cards and want to do cool things.
Finally this patch is need by a new HDR Rendering example
that I will put on the Wiki."
to be correctly importated from HDR files.
From Robert Osfield, tweaked the above to allow the original casting to RGB8 as an
options switched on by a osgDB::ReaderWriter::Options string with a value of "RGB8".