Last change
on this file since 137 was
137,
checked in by epyon, 12 years ago
|
- objload test added ( to be expanded )
|
File size:
472 bytes
|
Rev | Line | |
---|
[137] | 1 | #version 120
|
---|
| 2 | attribute vec3 position;
|
---|
| 3 | attribute vec2 texcoord;
|
---|
| 4 | attribute vec3 normal;
|
---|
| 5 | varying vec2 f_texcoord;
|
---|
| 6 | varying float f_diffuse_value;
|
---|
| 7 | uniform mat4 matrix_mvp;
|
---|
| 8 | uniform vec3 light;
|
---|
| 9 |
|
---|
| 10 | void main(void) {
|
---|
| 11 | vec3 vnormal = normalize(normal);
|
---|
| 12 | vec3 vlight = normalize(light - position);
|
---|
| 13 | float diffuse = max(dot(vlight, vnormal), 0.0);
|
---|
| 14 | f_diffuse_value = diffuse;
|
---|
| 15 | f_texcoord = texcoord;
|
---|
| 16 | gl_Position = matrix_mvp * vec4(position, 1.0);
|
---|
| 17 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.