Created attachment 189454 [details] Zip file containing Krita project file, screenshot of issue, generated textures SUMMARY Gradient-filled vector shape seems unaffected by dithering in Palettize filter layer, whereas another vector shape with a gradient overlay layer style applied is affected by said filter layer. I'm using the 6.0 beta, but this applies to previous versions as well. STEPS TO REPRODUCE 1. Create a project at 16-bit integer in sRGB-elle-V2-srgbtrc.icc color space 2. Create a vector shape and fill it with a black to white radial gradient 3. Create another white vector shape and apply a layer style of gradient overlay (radial) from black to white (do not check Dither) 4. Create a palette of black to white swatches at regular intervals with at least 256 entries (I've embedded one in the Krita project file I'm attaching) 5. Create a palettize filter layer above them both and use the palette to apply a noise dither in RGB color, 1.0 Spread, and Nearest Colors (again, see file) 6. It's going to be hard to see the difference on screen unless you enhance the texture a bit, but applying a Phong bump map filter layer over everything does illustrate the point, at least. I've thrown such an image in the zip. I've put a screenshot in the zip of the whole texture set applied to an object inside the Godot game engine. I've also included the exported textures in the zip if you feel like hooking those up in a game engine (normal map is OpenGL Y+ and occlusion, roughness, and metal are packed into an ORM file). OBSERVED RESULT The shape with gradient overlay will be relatively smooth (noisily dithered, but smooth), whereas the vector shape with gradient fill will still appear stair-stepped, a sort-of Minecraft-y effect. It seems almost unaffected by the palettize filter. Of course, the other issue is that gradients are not smooth even in 16-bit integer, necessitating the dithering (even then it's not 100% smooth, but it's better), but that's the highest I can go since the normal map filter doesn't work at all in float bit depths. EXPECTED RESULT I would expect the gradient-filled vector to appear just as the gradient overlay one does when dithering in the palettize filter is applied to both. SOFTWARE/OS VERSIONS Krita Version: 6.0.0-beta1 (git db05298) Hidpi: false Qt Version (compiled): 6.8.0 Version (loaded): 6.8.0 OS Information Build ABI: x86_64-little_endian-lp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: linux Kernel Version: 6.18.8-1-MANJARO Pretty Productname: Manjaro Linux Product Type: manjaro Product Version: unknown Desktop: XFCE Appimage build: Yes
Hi, Varkatope! I have checked your .kra file. It seems like you have dithering enabled in the Layer Style, that is why it generates a nicely smoothed radial gradient. If I disable dithering for a layer style, then both cones have artifacts, which look almost the same. Activating layer 'Dither by Palette' makes very little difference for me. As far as I can tell, it just samples the layer-style-generated gradient to 8 bits, which adds a little of nice noise. It does nothing for the vector-generated gradient, because all the vectors in Krita work in 8 bit unconditionally.
Created attachment 189508 [details] image comparing no dither vs layer style dither vs palettize dither
Hi Dmitry. Oops, I did have Dither checked in the layer style. However, that reminds me that I never submitted a bug report for the fact that that dither function in the layer styles actually does nothing at all in 16-bit (it does work in 8-bit if I recall). The dithering in the palettize filter, however, really does work in 16-bit and does work on the two shapes with gradient overlays applied, but not the vector gradient fill. I've just verified this. Can you please check again? I've added an image illustrating the various modes. Basically, there's zero difference between no dithering at all and checking the Dither option in the gradient overlay section in 16-bit, whereas the dithering in the palettize filter works on the gradient overlays but not the vector gradient fill. The gradient overlay already looks better with no dithering at all than the vector gradient fill, and improves with dithering from the palettize filter, though there are still artifacts (especially apparent in the linear gradient in the center).