Blender Git Loki
Git Commits -> Revision b41f858
Revision b41f858 by Jeroen Bakker (uvimage-editor-drawing) August 15, 2020, 07:29 (GMT) |
Use DrawManager for Image/UV Editor This project moves the current UV/Image editor drawing to the draw manager. Why would we do this: **Performance**: - current implementation would draw each texel per time. Multiple texels could be drawn per pixel what would overwrite the previous result. You can notice this when working with large textures. - repeat image drawing made this visible by drawing for a small period of time and stop drawing the rest. **Alpha drawing**: Current implementation would draw directly in display space. Giving incorrect results when displaying alpha transparent images. Old: {F8780114} New: {F8780113} This addresses {T52680} **Current Limitations** - The project can be activated in the user preferences as experimental features. When support of huge textures is implemented we can switch over. - Using images that are larger than supported by your GPU are resized (larger than 16000x16000). This leaves some blurring artifacts. We want to solve this after this patch has been reviewed and committed. Users will notice that the image is blurred a bit when zoomed in and looking at actual pixels. **TODO** * [ ] drawing of image unavailable grid. Need to check the use case for the current grid thing. * [x] drawing of masking + render info etc. * [ ] painting does not update the GPU textures. **Future** * Use smaller GPU textures when zoomed in. * Support huge texture sizes. * Migrate mask drawing to draw manager. Maniphest Tasks: T67530 Differential Revision: https://developer.blender.org/D8234 |
Commit Details:
Full Hash: b41f858752ec49908d1b8c37c67096cee6640da3
Parent Commit: 199e308
Lines Changed: +2950, -122
28 Added Paths:
/source/blender/draw/engines/editors/editors_batches.c (+62, -0) (View)
/source/blender/draw/engines/editors/editors_engine.c (+85, -0) (View)
/source/blender/draw/engines/editors/editors_engine.h (+28, -0) (View)
/source/blender/draw/engines/editors/editors_image.c (+296, -0) (View)
/source/blender/draw/engines/editors/editors_private.h (+54, -0) (View)
/source/blender/draw/engines/editors/editors_shaders.c (+82, -0) (View)
/source/blender/draw/engines/editors/shaders/editors_image_frag.glsl (+88, -0) (View)
/source/blender/draw/engines/editors/shaders/editors_image_vert.glsl (+25, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_background.c (+66, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_engine.c (+243, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_engine.h (+28, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_image_tiling.c (+118, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_private.h (+140, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_shaders.c (+192, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_uv.c (+150, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_uv_shadow.c (+74, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_uv_stretching.c (+140, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/common_overlay2d_lib.glsl (+5, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_background_frag.glsl (+54, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_image_tiling_border_vert.glsl (+14, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_uv_stretching_vert.glsl (+98, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_wireframe_frag.glsl (+78, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_wireframe_geom.glsl (+65, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_wireframe_vert.glsl (+27, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/uv_faces_vert.glsl (+22, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/uv_face_dots_vert.glsl (+18, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/uv_verts_frag.glsl (+33, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/uv_verts_vert.glsl (+41, -0) (View)
/source/blender/draw/engines/editors/editors_engine.c (+85, -0) (View)
/source/blender/draw/engines/editors/editors_engine.h (+28, -0) (View)
/source/blender/draw/engines/editors/editors_image.c (+296, -0) (View)
/source/blender/draw/engines/editors/editors_private.h (+54, -0) (View)
/source/blender/draw/engines/editors/editors_shaders.c (+82, -0) (View)
/source/blender/draw/engines/editors/shaders/editors_image_frag.glsl (+88, -0) (View)
/source/blender/draw/engines/editors/shaders/editors_image_vert.glsl (+25, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_background.c (+66, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_engine.c (+243, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_engine.h (+28, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_image_tiling.c (+118, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_private.h (+140, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_shaders.c (+192, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_uv.c (+150, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_uv_shadow.c (+74, -0) (View)
/source/blender/draw/engines/overlay2d/overlay2d_uv_stretching.c (+140, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/common_overlay2d_lib.glsl (+5, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_background_frag.glsl (+54, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_image_tiling_border_vert.glsl (+14, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_uv_stretching_vert.glsl (+98, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_wireframe_frag.glsl (+78, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_wireframe_geom.glsl (+65, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/overlay2d_wireframe_vert.glsl (+27, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/uv_faces_vert.glsl (+22, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/uv_face_dots_vert.glsl (+18, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/uv_verts_frag.glsl (+33, -0) (View)
/source/blender/draw/engines/overlay2d/shaders/uv_verts_vert.glsl (+41, -0) (View)
21 Modified Paths:
/release/scripts/startup/bl_ui/space_userpref.py (+1, -0) (Diff)
/source/blender/blenkernel/BKE_image.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/image_gpu.c (+38, -1) (Diff)
/source/blender/draw/CMakeLists.txt (+26, -0) (Diff)
/source/blender/draw/DRW_engine.h (+4, -0) (Diff)
/source/blender/draw/intern/draw_cache.c (+44, -0) (Diff)
/source/blender/draw/intern/draw_cache.h (+2, -0) (Diff)
/source/blender/draw/intern/draw_common.c (+3, -0) (Diff)
/source/blender/draw/intern/draw_common.h (+3, -1) (Diff)
/source/blender/draw/intern/draw_manager.c (+284, -31) (Diff)
/source/blender/draw/intern/draw_manager_text.c (+80, -50) (Diff)
/source/blender/draw/intern/draw_view.c (+63, -0) (Diff)
/source/blender/draw/intern/draw_view.h (+1, -0) (Diff)
/source/blender/draw/intern/DRW_render.h (+4, -3) (Diff)
/source/blender/draw/intern/shaders/common_globals_lib.glsl (+2, -0) (Diff)
/source/blender/editors/render/render_internal.c (+1, -0) (Diff)
/source/blender/editors/space_image/image_draw.c (+22, -9) (Diff)
/source/blender/editors/space_image/image_intern.h (+1, -0) (Diff)
/source/blender/editors/space_image/space_image.c (+37, -26) (Diff)
/source/blender/makesdna/DNA_userdef_types.h (+2, -1) (Diff)
/source/blender/makesrna/intern/rna_userdef.c (+5, -0) (Diff)
/source/blender/blenkernel/BKE_image.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/image_gpu.c (+38, -1) (Diff)
/source/blender/draw/CMakeLists.txt (+26, -0) (Diff)
/source/blender/draw/DRW_engine.h (+4, -0) (Diff)
/source/blender/draw/intern/draw_cache.c (+44, -0) (Diff)
/source/blender/draw/intern/draw_cache.h (+2, -0) (Diff)
/source/blender/draw/intern/draw_common.c (+3, -0) (Diff)
/source/blender/draw/intern/draw_common.h (+3, -1) (Diff)
/source/blender/draw/intern/draw_manager.c (+284, -31) (Diff)
/source/blender/draw/intern/draw_manager_text.c (+80, -50) (Diff)
/source/blender/draw/intern/draw_view.c (+63, -0) (Diff)
/source/blender/draw/intern/draw_view.h (+1, -0) (Diff)
/source/blender/draw/intern/DRW_render.h (+4, -3) (Diff)
/source/blender/draw/intern/shaders/common_globals_lib.glsl (+2, -0) (Diff)
/source/blender/editors/render/render_internal.c (+1, -0) (Diff)
/source/blender/editors/space_image/image_draw.c (+22, -9) (Diff)
/source/blender/editors/space_image/image_intern.h (+1, -0) (Diff)
/source/blender/editors/space_image/space_image.c (+37, -26) (Diff)
/source/blender/makesdna/DNA_userdef_types.h (+2, -1) (Diff)
/source/blender/makesrna/intern/rna_userdef.c (+5, -0) (Diff)