-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Labels
Description
Hi,
Really nice to see initiative to continue development on the (actually widely used) SOIL library!
For the below function:
SOIL_load_OGL_HDR_texture
(
const char *filename,
int fake_HDR_format,
int rescale_to_max,
unsigned int reuse_texture_ID,
unsigned int flags
);
the parameter rescale_to_max seems undocumented. Looking through the code it seems to be used for the formats that are alpha-premultipied (ie not RGBE). What I could find is this:
// image_helper.c
int RGBE_to_RGBdivA(...)
{
/* convert (note: no negative numbers, but 0.0 is possible) */
if( rescale_to_max )
{
scale = 255.0f / find_max_RGBE( image, width, height );
}
}
[...]
int RGBE_to_RGBdivA2(...)
{
/* convert (note: no negative numbers, but 0.0 is possible) */
if( rescale_to_max )
{
scale = 255.0f * 255.0f / find_max_RGBE( image, width, height );
}
}
I'm not really sure what it means, but it seems to me like rescale_to_max is intended as a boolean flag to somehow rescale the image by its maximum luminance, or something different...
Would it be possible to give a clarification for this, and possible also some documentation to the SOIL_load_OGL_HDR_texture interface?
Thanks! :)