Merge pull request #2551 from jpark37/cube-lut-enhance

Implement CUBE LUT domain properly, tetrahedral interpolation for 3D LUTs
This commit is contained in:
Jim
2020-05-20 18:09:56 -07:00
committed by GitHub
3 changed files with 230 additions and 72 deletions

View File

@@ -427,7 +427,9 @@ static bool gl_write_texture_code(struct gl_shader_parser *glsp,
else if (cf_token_is(cfp, "Load")) {
written = gl_write_texture_call(glsp, var, "texelFetch", false);
dstr_cat(&glsp->gl_string, "(");
function_end = ").xy, 0)";
function_end = (strcmp(var->type, "texture3d") == 0)
? ").xyz, 0)"
: ").xy, 0)";
}
if (!written)