Skip to content

scene: Add pixel grid snapping debug pass

Vlad Zahorodnii requested to merge work/zzag/fractional-scaling-debug into master

The debug shader is targeted to help with debugging blurriness when using fractional scaling.

The shader works as follows:

  • if the vertex coordinate has fractional part, the item will be highlighted with blue color
  • if the texture coordinate (in device pixels) has fractional part, the item will be highlighted with red color

The shader can be toggled by setting the KWIN_SCENE_VISUALIZE=fractional environment variable.

supersedes !2537 (closed)


Currently it looks as follows:

Screenshot_20230413_140930

the shadow tiles are stretched, so there's some blurriness and the shader highlights the region that's potentially not crisp

Merge request reports