From: Alexis Laferrière Date: Thu, 21 Jan 2016 11:12:16 +0000 (-0500) Subject: lib/gamnit depth: solve the mysterious bug "Why is the Y axis inverted?" X-Git-Tag: v0.8~7^2~13 X-Git-Url: http://nitlanguage.org lib/gamnit depth: solve the mysterious bug "Why is the Y axis inverted?" Signed-off-by: Alexis Laferrière --- diff --git a/lib/gamnit/depth/more_materials.nit b/lib/gamnit/depth/more_materials.nit index 983b0fc..453c7e4 100644 --- a/lib/gamnit/depth/more_materials.nit +++ b/lib/gamnit/depth/more_materials.nit @@ -45,7 +45,7 @@ class SmoothMaterial var mesh = model.mesh # Actor specs - program.translation.uniform(actor.center.x, -actor.center.y, actor.center.z, 0.0) + program.translation.uniform(actor.center.x, actor.center.y, actor.center.z, 0.0) program.scale.uniform actor.scale program.rotation.uniform new Matrix.rotation(actor.rotation, 0.0, 1.0, 0.0) @@ -137,7 +137,7 @@ class TexturedMaterial program.use_map_specular.uniform false end - program.translation.uniform(actor.center.x, -actor.center.y, actor.center.z, 0.0) + program.translation.uniform(actor.center.x, actor.center.y, actor.center.z, 0.0) program.scale.uniform actor.scale program.tex_coord.array_enabled = need_tex_coord @@ -182,7 +182,7 @@ class NormalsMaterial # TODO apply normal map - program.translation.uniform(actor.center.x, -actor.center.y, actor.center.z, 0.0) + program.translation.uniform(actor.center.x, actor.center.y, actor.center.z, 0.0) program.scale.uniform actor.scale program.tex_coord.array_enabled = true