source: orange/orange/OrangeWidgets/Visualize Qt/cone.vs @ 9078:a45873cc11c4

Revision 9078:a45873cc11c4, 432 bytes checked in by matejd <matejd@…>, 3 years ago (diff)

Fixed non-const assignment issue in a shader used by Sphereviz3D (works fine on mac now)

Line 
1attribute vec3 position;
2attribute vec3 normal;
3
4varying vec4 out_color;
5
6uniform mat4 projection;
7uniform mat4 modelview;
8
9const vec3 light_direction = vec3(-0.8305, 0.4983, 0.2491);
10
11void main(void)
12{
13    gl_Position = projection * modelview * vec4(position, 1.);
14    float diffuse = clamp(dot(light_direction, normalize((modelview * vec4(normal, 0.)).xyz)), 0., 1.);
15    out_color = vec4(vec3(1., 1., 1.) * diffuse + 0.1, 1.);
16}
Note: See TracBrowser for help on using the repository browser.