Page MenuHome

Fix T81002: Images drawn with the Python gpu module no longer draw on top in the Image Editor
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Sep 1 2022, 7:03 PM.

Details

Summary

This reverts commit 32d4a67017ecf4af75a9bfde885526550a6534ba thus fixing T81002 again.

And in order not to break T81212 (again) a different fix was implemented.


Setting 1.0 to gl_Position.z in a shader is not a conventional solution.

This limits the use of this shader by preventing some state from working.

Also, recently a proposal was discussed to remove 2D shaders that have a 3D counterpart (See D15836).

Since GPU_SHADER_2D_IMAGE has this special behavior, it cannot be replaced by GPU_SHADER_3D_IMAGE.

Diff Detail

Repository
rB Blender

Event Timeline

Germano Cavalcante (mano-wii) requested review of this revision.Sep 1 2022, 7:03 PM
Germano Cavalcante (mano-wii) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Sep 1 2022, 7:12 PM
Brecht Van Lommel (brecht) added inline comments.
intern/cycles/blender/display_driver.cpp
939 ↗(On Diff #55201)

I think this would be better done in draw/engines/external/external_engine.c, so other render engines get the same fix.

This should then be done in both external_draw_scene_do_v3d and external_draw_scene_do_image.

This revision now requires changes to proceed.Sep 1 2022, 7:12 PM
  • Set the state of writing only color for both external_draw_scene_do_v3d and external_draw_scene_do_image.

(Still need tests for external_draw_scene_do_image)

The change looks fine to me, assuming you tested it to work correctly for both cases.

This revision is now accepted and ready to land.Sep 5 2022, 2:58 PM