Fixed colors to match previous version of the example.

This commit is contained in:
David Williams 2014-05-24 22:58:31 +02:00
parent 99cf75e902
commit f78aad8abd

View File

@ -135,21 +135,26 @@ int main(int argc, char *argv[])
vec3 normal = worldNormal.xyz;
if(outMaterial.x == 1)
switch(outMaterial.x)
{
case 1:
outputColor = vec4(1.0, 0.0, 0.0, 1.0);
}
else if(outMaterial.x == 2)
{
break;
case 2:
outputColor = vec4(0.0, 1.0, 0.0, 1.0);
}
else if(outMaterial.x == 3)
{
break;
case 3:
outputColor = vec4(0.0, 0.0, 1.0, 1.0);
}
else
{
break;
case 4:
outputColor = vec4(1.0, 1.0, 0.0, 1.0);
break;
case 5:
outputColor = vec4(1.0, 0.0, 1.0, 1.0);
break;
default:
outputColor = vec4(1.0, 1.0, 1.0, 1.0);
break;
}
//float color = clamp(abs(dot(normalize(normal.xyz), vec3(0.9,0.1,0.5))), 0, 1);