|
@@ -1745,6 +1745,7 @@ void tnsConfigure2DTexture(tnsTexture *t){
|
|
|
elif(t->GLTexBitsType==GL_RGBA32UI){ format=GL_RGBA_INTEGER; type=GL_UNSIGNED_INT; t->IsUIntTexture=1; }
|
|
|
elif(t->GLTexBitsType==GL_R32UI){ format=GL_RED_INTEGER; type=GL_UNSIGNED_INT; t->IsUIntTexture=1; }
|
|
|
elif(t->GLTexBitsType==GL_RGBA16F){ format=GL_RGBA; type=GL_FLOAT; }
|
|
|
+ elif(t->GLTexBitsType==GL_RGBA32F){ format=GL_RGBA; type=GL_FLOAT; }
|
|
|
elif(t->GLTexBitsType==GL_DEPTH_STENCIL){ format=GL_DEPTH_STENCIL; type=GL_UNSIGNED_INT_24_8; t->GLTexBitsType=GL_DEPTH24_STENCIL8; }
|
|
|
#ifdef LAGUI_ANDROID
|
|
|
if(isDepth){t->GLTexBitsType=GL_DEPTH_COMPONENT24; type=GL_UNSIGNED_INT;}
|
|
@@ -4653,13 +4654,17 @@ void tnsXYZ2Clay(tnsVector3d xyz,tnsVector3d rgb){
|
|
|
0.0134474,-0.1183897,1.0154096};
|
|
|
tnsApplyRotation33d(rgb,mat,xyz);
|
|
|
}
|
|
|
-void tnsRGB2Clay(tnsVector3d rgb, tnsVector3d clay){
|
|
|
- tnsVector3d xyz; tnssRGB2XYZ(rgb,xyz);
|
|
|
- tnsXYZ2Clay(xyz,clay);
|
|
|
+void tnsD65P32XYZ(tnsVector3d rgb,tnsVector3d xyz){
|
|
|
+ tnsMatrix44d mat={0.48657095,0.26566769,0.19821729,
|
|
|
+ 0.22897456,0.69173852,0.07928691,
|
|
|
+ 0.0,0.04511338,1.04394437};
|
|
|
+ tnsApplyRotation33d(xyz,mat,rgb);
|
|
|
}
|
|
|
-void tnsClay2RGB(tnsVector3d clay, tnsVector3d rgb){
|
|
|
- tnsVector3d xyz; tnsClay2XYZ(clay,xyz);
|
|
|
- tnsXYZ2sRGB(xyz,rgb);
|
|
|
+void tnsXYZ2D65P3(tnsVector3d xyz,tnsVector3d rgb){
|
|
|
+ tnsMatrix44d mat={2.49349691,-0.93138362,-0.40271078,
|
|
|
+ -0.82948897,1.76266406,0.02362469,
|
|
|
+ 0.03584583,-0.07617239,0.95688452};
|
|
|
+ tnsApplyRotation33d(rgb,mat,xyz);
|
|
|
}
|
|
|
|
|
|
static real _srgb_transfer_function(real a){
|
|
@@ -4684,6 +4689,16 @@ void tns2LinearsRGB(real* srgb){
|
|
|
srgb[1]=_srgb_transfer_function_inv(srgb[1]);
|
|
|
srgb[2]=_srgb_transfer_function_inv(srgb[2]);
|
|
|
}
|
|
|
+void tns2LogClay(real* srgb){
|
|
|
+ srgb[0]=pow(srgb[0],2.19921875);
|
|
|
+ srgb[1]=pow(srgb[1],2.19921875);
|
|
|
+ srgb[2]=pow(srgb[2],2.19921875);
|
|
|
+}
|
|
|
+void tns2LinearClay(real* srgb){
|
|
|
+ srgb[0]=pow(srgb[0],1.0f/2.19921875);
|
|
|
+ srgb[1]=pow(srgb[1],1.0f/2.19921875);
|
|
|
+ srgb[2]=pow(srgb[2],1.0f/2.19921875);
|
|
|
+}
|
|
|
void tnsRGB2OKLAB(real* rgb, real* oklab){
|
|
|
real l = 0.4122214708f * rgb[0] + 0.5363325363f * rgb[1] + 0.0514459929f * rgb[2];
|
|
|
real m = 0.2119034982f * rgb[0] + 0.6806995451f * rgb[1] + 0.1073969566f * rgb[2];
|