lib/gamnit depth: fix ambient color, multiply with texture
[nit.git] / lib / gamnit / depth / more_materials.nit
index 52191c3..aa9600c 100644 (file)
@@ -317,7 +317,7 @@ class LambertProgram
                        float lambert = max(dot(light_dir, v_normal), 0.0);
 
                        if (use_map_ambient)
-                               gl_FragColor = ambient_color + texture2D(map_ambient, v_tex_coord);
+                               gl_FragColor = ambient_color * texture2D(map_ambient, v_tex_coord);
                        else
                                gl_FragColor = ambient_color;