dlanier
January 12th, 2007, 14:48
Hi,
Has anyone else tried to use miImg_tonemap to do some tone mapping on an image ?
I have a simple example that uses it but it has no effect for me...
I found these settings in an output shader, couldn't find who did it... It was named "Outputshader_HDR_2_LDR.c"
miBoolean ApplyToneMapping(miImg_image* src, miImg_image* dest)
{
miColor color;
color.r = 0.3f;
color.g = 0.59f;
color.b = 0.11f;
color.a = 0.0f;
miImg_tonemap tonemapParas;
memset(&tonemapParas, 0, sizeof(miImg_tonemap));
tonemapParas.low_in = 0.0f;
tonemapParas.hi_in = 16.0f;
tonemapParas.low_out = 0.0f;
tonemapParas.hi_out = 1.0f;
tonemapParas.lum_weights= color;
tonemapParas.n_bins = 100;
tonemapParas.ref = 1.0f;
tonemapParas.tolerance = 0.01f;
tonemapParas.x_res = 0;
tonemapParas.y_res = 0;
miBoolean b = mi_img_tonemap(dest, src, &tonemapParas);
return b;
}
Thank you.
Regards,
Has anyone else tried to use miImg_tonemap to do some tone mapping on an image ?
I have a simple example that uses it but it has no effect for me...
I found these settings in an output shader, couldn't find who did it... It was named "Outputshader_HDR_2_LDR.c"
miBoolean ApplyToneMapping(miImg_image* src, miImg_image* dest)
{
miColor color;
color.r = 0.3f;
color.g = 0.59f;
color.b = 0.11f;
color.a = 0.0f;
miImg_tonemap tonemapParas;
memset(&tonemapParas, 0, sizeof(miImg_tonemap));
tonemapParas.low_in = 0.0f;
tonemapParas.hi_in = 16.0f;
tonemapParas.low_out = 0.0f;
tonemapParas.hi_out = 1.0f;
tonemapParas.lum_weights= color;
tonemapParas.n_bins = 100;
tonemapParas.ref = 1.0f;
tonemapParas.tolerance = 0.01f;
tonemapParas.x_res = 0;
tonemapParas.y_res = 0;
miBoolean b = mi_img_tonemap(dest, src, &tonemapParas);
return b;
}
Thank you.
Regards,