Fix T47218: OpenGL render with missing alpha, due to recent OpenGL refactoring.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 25 Jan 2016 08:32:17 +0000 (09:32 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 25 Jan 2016 09:05:50 +0000 (10:05 +0100)
Patch by Ralf H√∂lzemer.

source/blender/editors/space_view3d/drawmesh.c

index 5c5652dabdd8cf7c6538077ae9b88d6c90e1078e..8deabfb31abc5eb4507cb541dc459d9c86ef6e39 100644 (file)
@@ -384,7 +384,7 @@ static bool set_draw_settings_cached(int clearcache, MTexPoly *texface, Material
                        float specular[3];
                        mul_v3_v3fl(specular, &ma->specr, ma->spec);
 
-                       GPU_basic_shader_colors(NULL, specular, ma->har, 0.0f);
+                       GPU_basic_shader_colors(NULL, specular, ma->har, 1.0f);
                        GPU_basic_shader_bind(options);
                }
                else {
@@ -1078,7 +1078,7 @@ static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs)
                        if (data->two_sided_lighting)
                                options |= GPU_SHADER_TWO_SIDED;
 
-                       GPU_basic_shader_colors(diffuse, NULL, 0, 0.0f);
+                       GPU_basic_shader_colors(diffuse, NULL, 0, 1.0f);
                        GPU_basic_shader_bind(options);
 
                        return;