Skip to content

Commit 260a25f

Browse files
committed
fix precision and attribute types
1 parent d38b9c8 commit 260a25f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

exercises/light-1/files/fragment.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
precision highp float;
1+
precision mediump float;
22

33
uniform mat4 model, view, projection;
44
uniform vec3 ambient;

exercises/light-1/files/vertex.glsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
precision highp float;
1+
precision mediump float;
22

3-
attribute vec4 position;
3+
attribute vec3 position;
44
uniform mat4 model, view, projection;
55
uniform vec3 ambient;
66

77
void main() {
8-
gl_Position = position;
8+
gl_Position = vec4(position, 1);
99
}

exercises/light-3/files/fragment.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
precision highp float;
1+
precision mediump float;
22

33
uniform mat4 model, view, projection;
44
uniform mat4 inverseModel, inverseView, inverseProjection;

exercises/light-3/files/vertex.glsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
precision highp float;
1+
precision mediump float;
22

3-
attribute vec4 position, normal;
3+
attribute vec3 position, normal;
44
uniform mat4 model, view, projection;
55
uniform mat4 inverseModel, inverseView, inverseProjection;
66
uniform vec3 ambient, diffuse, specular, lightDirection;
77
uniform float shininess;
88

99
void main() {
10-
gl_Position = position;
10+
gl_Position = vec4(position, 1);
1111
}

0 commit comments

Comments
 (0)