Do not use transparent rendering in 3d viewport for objects which are in edit mode
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 25 Nov 2011 12:55:42 +0000 (12:55 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 25 Nov 2011 12:55:42 +0000 (12:55 +0000)
Transparent rendering can't be implemented in way it gives accurate shading in
3d viewport. It's acceptable for object mode, but when you're in edit mode
it gives more problems than benefits of seeing transparent faces.

This is possible fix for for weird polygons in [#29255] Object invisible and weird polygons appearance

source/blender/editors/space_view3d/drawobject.c

index d3dd69b..7b53530 100644 (file)
@@ -3264,15 +3264,11 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
 
                if(dt>OB_WIRE) {
                        glsl = draw_glsl_material(scene, ob, v3d, dt);
-                       check_alpha = check_material_alpha(base, glsl);
 
-                       GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl,
-                                       (check_alpha)? &do_alpha_pass: NULL);
+                       GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
                }
 
-               // transp in editmode makes the fancy draw over go bad
-               if (!do_alpha_pass)
-                       draw_em_fancy(scene, v3d, rv3d, ob, em, cageDM, finalDM, dt);
+               draw_em_fancy(scene, v3d, rv3d, ob, em, cageDM, finalDM, dt);
 
                GPU_end_object_materials();