From 3b21c5bfcfab4874b6ae1cac8201f603341e3290 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Fri, 22 Jan 2016 16:32:11 -0500 Subject: [PATCH] lib/gamnit depth: fix ambient color, multiply with texture MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- .../assets/models/Quandtum_BA-2_v1_1.mtl | 2 +- lib/gamnit/depth/more_materials.nit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/model_viewer/assets/models/Quandtum_BA-2_v1_1.mtl b/contrib/model_viewer/assets/models/Quandtum_BA-2_v1_1.mtl index e71b6a4..51e49b9 100644 --- a/contrib/model_viewer/assets/models/Quandtum_BA-2_v1_1.mtl +++ b/contrib/model_viewer/assets/models/Quandtum_BA-2_v1_1.mtl @@ -3,7 +3,7 @@ newmtl Bot Ns 96.078431 -Ka 0.000000 0.000000 0.000000 +Ka 1.000000 1.000000 1.000000 Kd 0.640000 0.640000 0.640000 Ks 1.000000 1.000000 1.000000 Ni 1.000000 diff --git a/lib/gamnit/depth/more_materials.nit b/lib/gamnit/depth/more_materials.nit index 52191c3..aa9600c 100644 --- a/lib/gamnit/depth/more_materials.nit +++ b/lib/gamnit/depth/more_materials.nit @@ -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; -- 1.7.9.5