Tweak allocation vars for XYZ space for more accurate GPU transform
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 29 Apr 2013 10:53:10 +0000 (10:53 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 29 Apr 2013 10:53:10 +0000 (10:53 +0000)
Also extend 3DLUT edge size to 64 (1 meg of memory) to increase
transform accuracy as well.

intern/opencolorio/ocio_impl_glsl.cc
release/datafiles/colormanagement/config.ocio

index dc82e60d66a5a280163e6ad1127b6c6ff7176061..54be1e0f33994f3c249af046412330c1159d6f86 100644 (file)
@@ -51,8 +51,7 @@ using namespace OCIO_NAMESPACE;
 
 #include "ocio_impl.h"
 
-static const int LUT3D_EDGE_SIZE = 32;
-
+static const int LUT3D_EDGE_SIZE = 64;
 
 /* **** OpenGL drawing routines using GLSL for color space transform ***** */
 
@@ -97,7 +96,7 @@ static const char *g_fragShaderText = ""
 "        col[0] *= inv_alpha;\n"
 "        col[1] *= inv_alpha;\n"
 "        col[2] *= inv_alpha;\n"
-"}\n"
+"    }\n"
 "    gl_FragColor = OCIODisplay(col, tex2);\n"
 "\n"
 "}\n";
index 5cc073fe76cdf97aaefa4340e799ad7efa3aba2d..1e78c8945c093edc1167ddad6ba4a5484a58a43d 100644 (file)
@@ -171,11 +171,11 @@ colorspaces:
     equalitygroup:
     bitdepth: 32f
     isdata: false
-    allocation: uniform
-    allocationvars: [0, 1]
+    allocation: lg2
+    allocationvars: [-8.5, 5]
     from_reference: !<GroupTransform>
       children:
-        - !<FileTransform> {src: rec709_to_aces.spimtx, interpolation: nearest}
+        - !<FileTransform> {src: rec709_to_aces.spimtx, interpolation: linear}
         - !<FileTransform> {src: aces_to_xyz.spimtx, interpolation: linear}
 
   - !<ColorSpace>