6 uniform sampler2D tex0;
8 float luminance(vec4 color)
10 return dot(color, vec4(0.3, 0.59, 0.11, 0.0));
15 vec3 pos = vertPos.xyz / vertPos.w;
16 // vec3 pos = vertPos.xyz;
18 float ambVal = luminance(gl_Color);
19 //vec3 diffCol = texture2D(tex0, gl_TexCoord[0].xy).xyz;
20 vec3 diffCol = gl_FrontMaterial.diffuse.rgb;
22 gl_FragData[0] = vec4(pos, ambVal);
23 gl_FragData[1] = vec4(normalize(vertNorm), 0);
24 gl_FragData[2] = vec4(diffCol, 0);