diff options
author | alokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-10 15:37:18 +0000 |
---|---|---|
committer | alokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-10 15:37:18 +0000 |
commit | 1171826051857fc16c4271d606b17a58511f4d32 (patch) | |
tree | dc79c6804b15d0c3fa0fa8703780e09c687dd440 /o3d/compiler | |
parent | 2c7321c26a55679475633613add8b788ca1f02fd (diff) | |
download | chromium_src-1171826051857fc16c4271d606b17a58511f4d32.zip chromium_src-1171826051857fc16c4271d606b17a58511f4d32.tar.gz chromium_src-1171826051857fc16c4271d606b17a58511f4d32.tar.bz2 |
Corrected the mismatch between the dimensions of vectors and matrices. The binary operations between vectors and matrices require that the dimensions match.
Review URL: http://codereview.chromium.org/766001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41163 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/compiler')
-rw-r--r-- | o3d/compiler/glsl_validator/shaders/ambient.vert | 2 | ||||
-rw-r--r-- | o3d/compiler/glsl_validator/shaders/diffuse.vert | 6 | ||||
-rw-r--r-- | o3d/compiler/glsl_validator/shaders/texture_mapping.vert | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/o3d/compiler/glsl_validator/shaders/ambient.vert b/o3d/compiler/glsl_validator/shaders/ambient.vert index 7d90a80..88a755e 100644 --- a/o3d/compiler/glsl_validator/shaders/ambient.vert +++ b/o3d/compiler/glsl_validator/shaders/ambient.vert @@ -3,7 +3,7 @@ uniform mat4 g_ModelViewProjectionMatrix; -attribute vec3 g_Vertex; +attribute vec4 g_Vertex; void main() { diff --git a/o3d/compiler/glsl_validator/shaders/diffuse.vert b/o3d/compiler/glsl_validator/shaders/diffuse.vert index a51b22a..e155901 100644 --- a/o3d/compiler/glsl_validator/shaders/diffuse.vert +++ b/o3d/compiler/glsl_validator/shaders/diffuse.vert @@ -6,8 +6,8 @@ uniform mat4 g_ModelViewMatrix; uniform mat4 g_NormalMatrix; uniform vec4 g_LightSource0Position; -attribute vec3 g_Vertex; -attribute vec3 g_Normal; +attribute vec4 g_Vertex; +attribute vec4 g_Normal; varying vec3 normal; varying vec3 vertex_to_light_vector; @@ -18,7 +18,7 @@ void main() gl_Position = g_ModelViewProjectionMatrix * g_Vertex; // Transforming The Normal To ModelView-Space - normal = g_NormalMatrix * g_Normal; + normal = vec3(g_NormalMatrix * g_Normal); // Transforming The Vertex Position To ModelView-Space vec4 vertex_in_modelview_space = g_ModelViewMatrix * g_Vertex; diff --git a/o3d/compiler/glsl_validator/shaders/texture_mapping.vert b/o3d/compiler/glsl_validator/shaders/texture_mapping.vert index de653b4..6e13f4d 100644 --- a/o3d/compiler/glsl_validator/shaders/texture_mapping.vert +++ b/o3d/compiler/glsl_validator/shaders/texture_mapping.vert @@ -3,7 +3,7 @@ uniform mat4 g_ModelViewProjectionMatrix; -attribute vec3 g_Vertex; +attribute vec4 g_Vertex; attribute vec4 g_MultiTexCoord0; varying vec2 texture_coordinate; |