-
-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
I've seen weirdly broken rendering with a real-world LUT, but this should be an easy reproducer.
LUT
A simple LUT generated with:
#include <stdio.h>
int main() {
int size = 13;
float step = 1.0f / (size - 1);
printf("LUT_3D_SIZE %d\n\n", size);
for (int b_c=size-1; b_c >= 0; b_c--) {
for (int g_c=size-1; g_c >= 0; g_c--) {
for (int r_c=size-1; r_c >=0; r_c--) {
printf("%g %g %g\n", (step*r_c - 0.1)*11.0/9.0, (step*g_c - 0.1)*11.0/9.0, (step*b_c - 0.1)*11.0/9.0);
}
}
}
}Shader
Reproduction
mpv --no-config --pause -image-lut file.lut -glsl-shader file.glsl av://lavfi:testsrc=size=1280x720
mpv --no-config --pause -lut file.lut -glsl-shader file.glsl av://lavfi:testsrc=size=1280x720
mpv --no-config --pause -target-lut file.lut -glsl-shader file.glsl av://lavfi:testsrc=size=1280x720
# or without mpv
ffplay -vf libplacebo=lut=file.lut:custom_shader_path=file.glsl -f lavfi testsrc
Results
Broken
With image-lut + unscaled
Working
With image-lut + upscaled (lanczos)
It's broken in all other cases: downscaling, lut, target-lut, or upscaling without a libplacebo shader (bilinear).
And even when the rendering is okay, non-window screenshots would still look broken.
Metadata
Metadata
Assignees
Labels
No labels

