Back again with fresh ideas!
Hi!
Now I'm back again, and have resumed work on the Raw Engine. The two lastest features are Levels and Perspective Correction.
Levels was quite interesting, as gamma doesn't really make much sense in under- or over-exposed areas. That resulted in some funky colors and weird banding on values less than black and more than white. If I min/max'ed the values before applying gamma, it resulted in not-quite-white areas because chrominace wasn't always 0 in these areas. So I had to adjust the shader to only apply gamma in the valid 0 to 1 range, and pass the Luminance straight through otherwise.
Perpective Correction is basicly allowing the user to drag each corner of the image.
I still have some newly introduced problems to look after. Right now the mouse to GUI to texture coordinate mapping is getting rather funny - mostly rotation is making things a bit funky. But I hope to iron out these things tonight. I also b0rked something when implementing ufraw's White Balance presets. Right now the white balance just seems wrong, and colors are a bit off compared to everything else.
Other things have been crossing my mind. Mostly the rather simple task of creating a histogram has been interesting to me. It seems almost inavoidable to me to have to read back a (reduced) version from GPU to memory for a histogram analysis, and uploading a pixel array with the histogram data. Performancewise this is not very desirable, even if this only has to be done when a parameter has been updated, but it seems there is no way around it.
Interpolation is also something I'll have to deal with soon. Rotation and perpective correction requires a better interpolator than bilinear. So my first plan i a bicubic interpolator.
Latest Screenshot.
Now I'm back again, and have resumed work on the Raw Engine. The two lastest features are Levels and Perspective Correction.
Levels was quite interesting, as gamma doesn't really make much sense in under- or over-exposed areas. That resulted in some funky colors and weird banding on values less than black and more than white. If I min/max'ed the values before applying gamma, it resulted in not-quite-white areas because chrominace wasn't always 0 in these areas. So I had to adjust the shader to only apply gamma in the valid 0 to 1 range, and pass the Luminance straight through otherwise.
Perpective Correction is basicly allowing the user to drag each corner of the image.
I still have some newly introduced problems to look after. Right now the mouse to GUI to texture coordinate mapping is getting rather funny - mostly rotation is making things a bit funky. But I hope to iron out these things tonight. I also b0rked something when implementing ufraw's White Balance presets. Right now the white balance just seems wrong, and colors are a bit off compared to everything else.
Other things have been crossing my mind. Mostly the rather simple task of creating a histogram has been interesting to me. It seems almost inavoidable to me to have to read back a (reduced) version from GPU to memory for a histogram analysis, and uploading a pixel array with the histogram data. Performancewise this is not very desirable, even if this only has to be done when a parameter has been updated, but it seems there is no way around it.
Interpolation is also something I'll have to deal with soon. Rotation and perpective correction requires a better interpolator than bilinear. So my first plan i a bicubic interpolator.
Latest Screenshot.