Changeset 9078:a45873cc11c4 in orange


Ignore:
Timestamp:
10/08/11 12:31:13 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
8ad5f1438991802f9c5369828768617349a5de60
Message:

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

Location:
orange/OrangeWidgets/Visualize Qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Visualize Qt/cone.fs

    r8928 r9078  
    1 varying vec4 color; 
     1varying vec4 out_color; 
    22 
    33void main(void) 
    44{ 
    5     gl_FragColor = color; 
     5    gl_FragColor = out_color; 
    66} 
  • orange/OrangeWidgets/Visualize Qt/cone.vs

    r8928 r9078  
    22attribute vec3 normal; 
    33 
    4 varying vec4 color; 
     4varying vec4 out_color; 
    55 
    66uniform mat4 projection; 
    77uniform mat4 modelview; 
    88 
    9 const vec3 light_direction = normalize(vec3(-0.7, 0.42, 0.21)); 
     9const vec3 light_direction = vec3(-0.8305, 0.4983, 0.2491); 
    1010 
    1111void main(void) 
     
    1313    gl_Position = projection * modelview * vec4(position, 1.); 
    1414    float diffuse = clamp(dot(light_direction, normalize((modelview * vec4(normal, 0.)).xyz)), 0., 1.); 
    15     color = vec4(vec3(1., 1., 1.) * diffuse + 0.1, 1.); 
     15    out_color = vec4(vec3(1., 1., 1.) * diffuse + 0.1, 1.); 
    1616} 
Note: See TracChangeset for help on using the changeset viewer.