Last change
on this file since 321 was
321,
checked in by epyon, 11 years ago
|
- updated all tests to new nova
- cleaned up tests paths
- general cleanup of tests and test data
|
File size:
729 bytes
|
Rev | Line | |
---|
[137] | 1 | #version 120
|
---|
[139] | 2 |
|
---|
[161] | 3 | attribute vec3 nv_position;
|
---|
| 4 | attribute vec2 nv_texcoord;
|
---|
| 5 | attribute vec3 nv_normal;
|
---|
[139] | 6 |
|
---|
| 7 | varying vec3 v_normal;
|
---|
| 8 | varying vec3 v_light_vector;
|
---|
| 9 | varying vec3 v_view_vector;
|
---|
| 10 | varying vec2 v_texcoord;
|
---|
| 11 |
|
---|
[321] | 12 | uniform mat4 nv_m_mvp;
|
---|
[139] | 13 | uniform mat4 nv_m_modelview;
|
---|
| 14 | uniform mat4 nv_m_projection;
|
---|
| 15 | uniform mat3 nv_m_normal;
|
---|
| 16 | uniform vec3 light_position;
|
---|
[137] | 17 |
|
---|
| 18 | void main(void) {
|
---|
[161] | 19 | vec4 vertex = vec4( nv_position, 1.0 );
|
---|
[139] | 20 | vec3 eye_pos = vec3( nv_m_modelview * vertex );
|
---|
[161] | 21 | v_normal = normalize( nv_m_normal * nv_normal );
|
---|
[139] | 22 | v_light_vector = vec3( normalize( light_position - eye_pos ) );
|
---|
| 23 | v_view_vector = vec3( normalize( -eye_pos ) );
|
---|
| 24 |
|
---|
[161] | 25 | v_texcoord = nv_texcoord;
|
---|
[321] | 26 | gl_Position = nv_m_mvp * vertex;
|
---|
[137] | 27 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.