1
// Copyright (C) 2007 Dave Griffiths
2
// Licence: GPLv2 (see COPYING)
3
// Fluxus Shader Library
4
// ---------------------
5
// Glossy Specular Reflection Shader
6
// A more controllable version of blinn shading,
7
// Useful for ceramic or fluids - from Advanced
8
// Renderman, thanks to Larry Gritz
10
#define PROCESSING_LIGHT_SHADER
12
uniform mat4 modelview;
13
uniform mat4 transform;
14
uniform mat3 normalMatrix;
16
uniform vec4 lightPosition[8];
18
attribute vec4 vertex;
19
attribute vec3 normal;
27
N = normalize(normalMatrix * normal);
29
V = -vec3(modelview * vertex);
30
L = vec3(modelview * (lightPosition[0] - vertex));
31
gl_Position = transform * vertex;