test.vs 351 B

1234567891011121314151617
  1. #version 430
  2. layout (location = 0) in vec3 position;
  3. layout (location = 1) in vec3 normal;
  4. uniform mat4 proj;
  5. uniform mat4 view;
  6. uniform mat4 model;
  7. out float varLight;
  8. void main(void) {
  9. varLight = 1.0f;
  10. varLight -= abs(normal.x) * 0.15;
  11. varLight -= abs(normal.z) * 0.30;
  12. gl_Position = proj * view * model * vec4(position, 1.0);
  13. }