Skip to content

Commit

Permalink
Merge branches 'master' and 'bug46'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andor committed Aug 13, 2010
2 parents 77b73e5 + 9c63dde commit 2279991
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions psapi.js
Expand Up @@ -83,6 +83,7 @@ function PointStream(){

// Vertex shader for boxes and spheres
var vertexShaderSource =
"varying vec4 frontColor;" +
"attribute vec3 aVertex;" +
"attribute vec3 aNormal;" +
"attribute vec4 aColor;" +
Expand Down Expand Up @@ -148,11 +149,11 @@ function PointStream(){
// If there were no lights this draw call, just use the
// assigned fill color of the shape and the specular value
" if( lightCount == 0 ) {" +
" gl_FrontColor = vec4(col[0], col[1], col[2], 1.0);" +
" frontColor = vec4(col[0], col[1], col[2], 1.0);" +
" }" +
" else {" +
" PointLight(finalDiffuse, ecPos, norm, eye );" +
" gl_FrontColor = vec4(finalDiffuse[0] * col[0], finalDiffuse[1] * col[1], finalDiffuse[2] * col[2], 1.0);" +
" frontColor = vec4(finalDiffuse[0] * col[0], finalDiffuse[1] * col[1], finalDiffuse[2] * col[2], 1.0);" +
" }" +

" float dist = length( view * model * vec4(aVertex, 1.0));" +
Expand All @@ -169,8 +170,9 @@ function PointStream(){
"}";

var fragmentShaderSource =
"varying vec4 frontColor;" +
"void main(void){" +
" gl_FragColor = gl_Color;" +
" gl_FragColor = frontColor;" +
"}";

/**
Expand Down

0 comments on commit 2279991

Please sign in to comment.