From 994c9864f22944decf00cbef0a39bb7fb139327f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Tue, 19 Jan 2016 08:56:28 -0500 Subject: [PATCH] lib/gamnit depth: make scale and translation uniforms MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/gamnit/depth/more_materials.nit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gamnit/depth/more_materials.nit b/lib/gamnit/depth/more_materials.nit index 40fe1fa..983b0fc 100644 --- a/lib/gamnit/depth/more_materials.nit +++ b/lib/gamnit/depth/more_materials.nit @@ -212,10 +212,10 @@ class LambertProgram attribute vec4 coord; // Vertex translation - attribute vec4 translation; + uniform vec4 translation; // Vertex scaling - attribute float scale; + uniform float scale; // Vertex coordinates on textures attribute vec2 tex_coord; @@ -349,13 +349,13 @@ class LambertProgram var camera = uniforms["camera"].as(UniformVec3) is lazy # Translation applied to each vertex - var translation = attributes["translation"].as(AttributeVec4) is lazy + var translation = uniforms["translation"].as(UniformVec4) is lazy # Rotation matrix var rotation = uniforms["rotation"].as(UniformMat4) is lazy # Scaling per vertex - var scale = attributes["scale"].as(AttributeFloat) is lazy + var scale = uniforms["scale"].as(UniformFloat) is lazy # Model view projection matrix var mvp = uniforms["mvp"].as(UniformMat4) is lazy -- 1.7.9.5