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
Hello. I'm trying to apply CMS to my renderer which is implemented using OpenGL.
Specifically I supposed generated image in GPU buffer(rendered image) is in sRGB space and I'm trying to convert that image into my monitor's RGB space inside of my fragment shader.
To accomplish CMS inside of GPU I should send matrix or LUT as form of uniform variable. So that my fragment shader can access to information about color transform .
I have basic knowldege about CMS so I thought cmsHTRANSFORM has some sort of conversion matrix or look up table to compute source to target RGB conversion.
So first thing that I tried to find was 3x3(or 4x4) conversion matrix or look up table
which convert RGB in color space A to RGB in color space B in cmsHTRANSFORM.
But I couldn't find anything like that in API documents.
Maybe I don't know the keyword related to it.
Does LCMS support LUT or 3x3 conversion matrix?
If not, is there any way to achieve CMS in my renderer?
The text was updated successfully, but these errors were encountered:
Hi, what you intend to do is easy. Once you got the RGB8 to RGB8 transform, you can create a LUT table by sampling it at regular intervals. Something like:
for (r=0; r < 256; r += 16)
for (g=0; g < 256; g+=16)
for (b=0; b < 256; b+=16)
{
put r, g, b into rgb[] table
cmsDoTransform(rgb, rgb_out, 1);
keep rgb_out as LUT node
}
Then upload the LUT to the GPU and perform trilinear interpolation.
Hello. I'm trying to apply CMS to my renderer which is implemented using OpenGL.
Specifically I supposed generated image in GPU buffer(rendered image) is in sRGB space and I'm trying to convert that image into my monitor's RGB space inside of my fragment shader.
So I made simple transform which looks like this.
hTransform = cmsCreateTransform(profile_sRGB, TYPE_BGR_8, profile_leftMonitor, TYPE_BGR_8, INTENT_PERCEPTUAL, 0);
To accomplish CMS inside of GPU I should send matrix or LUT as form of uniform variable. So that my fragment shader can access to information about color transform .
I have basic knowldege about CMS so I thought cmsHTRANSFORM has some sort of conversion matrix or look up table to compute source to target RGB conversion.
So first thing that I tried to find was 3x3(or 4x4) conversion matrix or look up table
which convert RGB in color space A to RGB in color space B in cmsHTRANSFORM.
But I couldn't find anything like that in API documents.
Maybe I don't know the keyword related to it.
Does LCMS support LUT or 3x3 conversion matrix?
If not, is there any way to achieve CMS in my renderer?
The text was updated successfully, but these errors were encountered: