You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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! :)
The text was updated successfully, but these errors were encountered:
This is something that wasn't documented in the original SOIL version. I'm actually not sure what's supposed to do, but it looks exactly what you're interpreting from the code, it looks that rescales the image colors to their maximum luminance when converting it from RGBE. I prefer not to document it unless I'm sure what's doing.
Hi,
Really nice to see initiative to continue development on the (actually widely used) SOIL library!
For the below function:
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: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! :)
The text was updated successfully, but these errors were encountered: