Tonemap changed my image alpha

Hi. Is there anyway to keep my image alpha unchanged after the simple tonemap?
Otherwise the image looks half transparent now.
Also, beside the built-in denoiser and tonemap is there a plan that user could add their own stage?
thanks so much.

The tonemapper should only work on the first three components, at least for gamma and exposure:

Please have a look at the “denoise_alpha” variable on the denoiser post-processing stage which allows to keep the alpha intact:

I any case, you can also implement any custom tonemapper you like with an own kernel. The OptiX Introduction example 09 shows how to do that. I would not recommend to use the LDR denoiser anymore.
The optixIntro_10 example shows how to use the HDR denoiser in OptiX 5.1.0 and does the tonemapping inside the final texture blit with a GLSL shader.

All necessary links here: [url][/url]

hi Detlef:
Thanks for your reply. I have tried turned on/off denoiser and tonemap. Only when tonemap is on and while i’m changing the exposure/ gamma i can see my render image alpha is changing as well. denoiser doesn’t change alpha on/off.

I can reproduce the issue with optixDenoiser sample from the sdk 5.1
1:change the displayBufferPPM function in sutil.cpp and save the alpha to the PPM Blue channel.(i didn’t figure out how to save a rgba ppm yet )
2:by pass tonemap by denoiserStage->declareVariable(“input_buffer”)->set(getOutputBuffer());
3:run the denoiser and press “s” to save a image. check the blue channel should read 255
4:turn on the tonemap by revert the above code
5:run again and save a image. check the blue channel. now read 83. should be stay 255.

I will try use the intro 9 sample for tonemap . thanks you.

Does this explain it?

There is always a tonemapper active even at default gamma and exposure values.
You should roll your own implementation if that isn’t what you need.