Bug 475587 - Random noise filter issues
Summary: Random noise filter issues
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Filter Layers (show other bugs)
Version: 5.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-14 01:24 UTC by Dorijan Salak
Modified: 2024-08-22 16:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dorijan Salak 2023-10-14 01:24:49 UTC
SUMMARY
Random noise filter not being applied or updated correctly.

STEPS TO REPRODUCE
1. Draw on a raster layer
2. Add Filter - Random Noise to the layer, either destructively or as filter mask
3. If added destructively directly to the layer the issue is visible immediately, if added as filter mask change parent layer Opacity or Blending mode to see the issue
4. Additionally if added as filter mask, draw new pixels after step 3

OBSERVED RESULT
When applying Random noise filter directly to the layer it only applies it in a box shape around the pixels on the layer, not the entire layer. And when applying it as filter mask it affects the entire layer but does not update correctly when changing parent layer opacity, blending mode or when drawing new pixels to the layer, leaving artifacts around new pixels or updating only box shape area around current pixels when changing blending mode/opacity.
Turning filter mask visibility off then back on will update the filter correctly.

EXPECTED RESULT
Applying the filter to the entire layer and automatic updating in case of filter mask.

SOFTWARE/OS VERSIONS
Windows: Windows 10 Pro, Version 10.0.19045 Build 19045

KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.15.7



ADDITIONAL INFORMATION
Krita
  Version: 5.2.0

Qt
  Version (compiled): 5.15.7
  Version (loaded): 5.15.7

OS Information
  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.19045
  Pretty Productname: Windows 10 Version 2009
  Product Type: windows
  Product Version: 10


OpenGL Info
 
  Vendor:  "Google Inc. (NVIDIA)" 
  Renderer:  "ANGLE (NVIDIA, NVIDIA GeForce RTX 2080 SUPER Direct3D11 vs_5_0 ps_5_0, D3D11-31.0.15.3699)" 
  Driver version:  "OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash: f2280c0c5f93+krita_qt5)" 
  Shading language:  "OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0 git hash: f2280c0c5f93+krita_qt5)" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
  Current format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
  GL version: 3.0 
  Supports deprecated functions false 
  Is OpenGL ES: true 
  supportsBufferMapping: true 
  supportsBufferInvalidation: false 
  forceDisableTextureBuffers: true 
  Extensions: 
     GL_ANGLE_multi_draw 
     GL_EXT_clip_control 
     GL_ANGLE_provoking_vertex 
     GL_OES_rgb8_rgba8 
     GL_ANGLE_framebuffer_multisample 
     GL_ANGLE_memory_size 
     GL_CHROMIUM_bind_generates_resource 
     GL_OES_compressed_EAC_RG11_signed_texture 
     GL_OES_compressed_ETC2_RGBA8_texture 
     GL_OES_mapbuffer 
     GL_ANGLE_base_vertex_base_instance_shader_builtin 
     GL_OES_EGL_image_external_essl3 
     GL_ANGLE_texture_compression_dxt5 
     GL_EXT_draw_buffers 
     GL_OES_texture_half_float 
     GL_OES_compressed_EAC_RG11_unsigned_texture 
     GL_OES_depth24 
     GL_EXT_occlusion_query_boolean 
     GL_NV_pixel_buffer_object 
     GL_ANGLE_client_arrays 
     GL_ANGLE_pack_reverse_row_order 
     GL_ANGLE_program_cache_control 
     GL_EXT_EGL_image_external_wrap_modes 
     GL_OES_compressed_ETC2_RGB8_texture 
     GL_EXT_texture_rg 
     GL_CHROMIUM_sync_query 
     GL_OVR_multiview 
     GL_ANGLE_texture_multisample 
     GL_EXT_debug_label 
     GL_EXT_debug_marker 
     GL_OES_texture_float 
     GL_KHR_debug 
     GL_EXT_discard_framebuffer 
     GL_OES_EGL_image_external 
     GL_EXT_blend_minmax 
     GL_EXT_texture_compression_rgtc 
     GL_OES_compressed_ETC2_sRGB8_texture 
     GL_CHROMIUM_copy_texture 
     GL_EXT_multi_draw_indirect 
     GL_ANGLE_copy_texture_3d 
     GL_ANGLE_texture_usage 
     GL_EXT_unpack_subimage 
     GL_NV_fence 
     GL_EXT_texture_compression_s3tc_srgb 
     GL_OES_packed_depth_stencil 
     GL_EXT_map_buffer_range 
     GL_OES_draw_elements_base_vertex 
     GL_CHROMIUM_bind_uniform_location 
     GL_NV_pack_subimage 
     GL_OES_draw_buffers_indexed 
     GL_EXT_texture_filter_anisotropic 
     GL_OES_surfaceless_context 
     GL_EXT_robustness 
     GL_EXT_texture_compression_dxt1 
     GL_OES_EGL_image 
     GL_ANGLE_instanced_arrays 
     GL_EXT_texture_storage 
     GL_OES_texture_border_clamp 
     GL_EXT_draw_elements_base_vertex 
     GL_OES_vertex_array_object 
     GL_EXT_color_buffer_float 
     GL_NV_EGL_stream_consumer_external 
     GL_OES_get_program_binary 
     GL_ANGLE_framebuffer_blit 
     GL_ANGLE_get_tex_level_parameter 
     GL_OES_texture_npot 
     GL_ANGLE_request_extension 
     GL_ANGLE_translated_shader_source 
     GL_KHR_parallel_shader_compile 
     GL_OES_texture_float_linear 
     GL_OVR_multiview2 
     GL_EXT_color_buffer_half_float 
     GL_OES_texture_half_float_linear 
     GL_ANGLE_base_vertex_base_instance 
     GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture 
     GL_OES_texture_stencil8 
     GL_ANGLE_robust_client_memory 
     GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture 
     GL_WEBGL_video_texture 
     GL_OES_compressed_EAC_R11_signed_texture 
     GL_OES_compressed_EAC_R11_unsigned_texture 
     GL_NV_framebuffer_blit 
     GL_OES_element_index_uint 
     GL_OES_standard_derivatives 
     GL_ANGLE_lossy_etc_decode 
     GL_AMD_performance_monitor 
     GL_EXT_multisampled_render_to_texture 
     GL_EXT_texture_norm16 
     GL_ANGLE_get_serialized_context_string 
     GL_EXT_instanced_arrays 
     GL_ANGLE_texture_compression_dxt3 
     GL_EXT_draw_buffers_indexed 
     GL_ANGLE_depth_texture 
     GL_EXT_texture_compression_bptc 
     GL_ANGLE_multiview_multisample 
     GL_EXT_float_blend 
     GL_EXT_shader_texture_lod 
     GL_EXT_texture_type_2_10_10_10_REV 
     GL_OES_compressed_ETC2_sRGB8_alpha8_texture 
     GL_OES_fbo_render_mipmap 
     GL_EXT_disjoint_timer_query 
     GL_EXT_blend_func_extended 
     GL_EXT_texture_format_BGRA8888 
     GL_CHROMIUM_copy_compressed_texture 
     GL_CHROMIUM_lose_context 
     GL_EXT_read_format_bgra 
     GL_EXT_frag_depth 
     GL_EXT_sRGB 
     GL_OES_depth32 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsAngleD3D11: true 
  isQtPreferAngle: true 
  Detected renderers: 
    (Supported) ANGLE (Microsoft, Microsoft Basic Render Driver Direct3D11 vs_5_0 ps_5_0, D3D11-10.0.19041.3570) (OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash: f2280c0c5f93+krita_qt5)) 
    (Supported) ANGLE (NVIDIA, NVIDIA GeForce RTX 2080 SUPER Direct3D11 vs_5_0 ps_5_0, D3D11-31.0.15.3699) (OpenGL ES 3.0.0 (ANGLE 2.1.0 git hash: f2280c0c5f93+krita_qt5)) 
    (Supported) NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 (4.6.0 NVIDIA 536.99)  

Hardware Information
 Memory: 31 Gb
 Cores: 8
 Swap: C:/Users/Dorijan Salak/AppData/Local/Temp
Comment 1 wolthera 2023-10-18 10:45:10 UTC
I can only reproduce the 'destructive' version, but not the filter mask version, but reproduce I can.
Comment 2 Dorijan Salak 2023-10-19 01:00:59 UTC
(In reply to wolthera from comment #1)
> I can only reproduce the 'destructive' version, but not the filter mask
> version, but reproduce I can.

Hmm, weird... I can reproduce it every time both ways. But when applied as mask only when I add extra pixels or change layer opacity/blending mode. Also found out if I turn off the parent layer, the noise from the random noise mask stays active everywhere except for the box shape around where parent layer pixels were.
Comment 3 Dorijan Salak 2023-10-27 03:53:40 UTC
Been fiddling around with filters in general and I found out more bugs that are probably closely tied to this report. Unsure if I should fill a new report or add more info here but for now I'll just add here some of the issues I found out.

Generally adding  filters through Krita > Filter menu (or their corresponding shortcuts) will have a weird behavior. Some filters don't show updated preview on canvas or when applied destructively (OK button in the called menu) will not apply at all (as if no change was made to curves and such). While when applying same filter as mask (Create Filter Mask button in the same menu) will show changes on the canvas but only after creating the mask, not in preview, and later further adjusting (F3 on added filter) will work as it should showing correct preview and everything. Some filters have issues only when applied to certain layer type, such as filtering a Filter Layer or Fill Layer while they work correctly on Paint Layer (ex. Color Adjustment will work on Paint Layer correctly but not on Filter or Fill Layer while Random Noise seems to be incorrect on most layer types). 

Many, if not all, filters have similar issues when added this way but when added through Layers widget (+ sign on the bottom or settings drop down then add > filter mask or their corresponding shortcuts) will work correctly. Random noise still seems to have an issue if changing parent layer opacity no matter which way the filter is added.
Comment 4 Dmitry Kazakov 2024-08-22 16:39:11 UTC
Remove triaged keyword from CONFIRMED bugs