Commits

Roi Atalla committed 3bc5a7a

Fixed all shader files to have proper float values and changed each tutorial's window title to include the tutorial name.

  • Participants
  • Parent commits 8f048ff

Comments (0)

Files changed (96)

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter1/Example1_1.java

 	private int program, vbo;
 	
 	public Example1_1() {
-		super("Example 1.1", 500, 500, true);
+		super("Example 1.1 - Hello Triangle", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter1/example1.1.frag

 
 void main()
 {
-	outputColor = vec4(1,1,1,1);
+	outputColor = vec4(1.0, 1.0, 1.0, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example1/Example10_1.java

 	private boolean drawColoredCyl, drawLight;
 	
 	public Example10_1() {
-		super("Example 10.1", 500, 500, true);
+		super("Example 10.1 - Vertex Point Lighting", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example1/example10.1.Transform.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example1/example10.1.VertexLighting_PCN.vert

 
 void main()
 {
-	vec4 cameraPosition = modelToCameraMatrix * vec4(position, 1);
+	vec4 cameraPosition = modelToCameraMatrix * vec4(position, 1.0);
 	gl_Position = cameraToClipMatrix * cameraPosition;
 	
 	vec3 normCamSpace = normalize(normalModelToCameraMatrix * normal);
 	vec3 dirToLight = normalize(lightPos - vec3(cameraPosition));
 	
 	float cosAngIncidence = dot(normCamSpace, dirToLight);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	interpColor = (diffuseColor * lightIntensity * cosAngIncidence) + (diffuseColor * ambientIntensity);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example1/example10.1.VertexLighting_PN.vert

 
 void main()
 {
-	vec4 cameraPosition = modelToCameraMatrix * vec4(position, 1);
+	vec4 cameraPosition = modelToCameraMatrix * vec4(position, 1.0);
 	gl_Position = cameraToClipMatrix * cameraPosition;
 	
 	vec3 normCamSpace = normalize(normalModelToCameraMatrix * normal);
 	vec3 dirToLight = normalize(lightPos - vec3(cameraPosition));
 	
 	float cosAngIncidence = dot(normCamSpace, dirToLight);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	interpColor = lightIntensity * cosAngIncidence + ambientIntensity;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example2/Example10_2.java

 	private boolean useFragmentLighting = true, drawColoredCyl, drawLight, scaleCyl;
 	
 	public Example10_2() {
-		super("Example 10.2", 500, 500, true);
+		super("Example 10.2 - Fragment Point Lighting", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example2/example10.2.FragLighting.frag

 {
 	vec3 lightDir = normalize(modelSpaceLightPos - modelSpacePosition);
 	
-	float cosAngIncidence = clamp(dot(normalize(vertexNormal), lightDir), 0, 1);
+	float cosAngIncidence = clamp(dot(normalize(vertexNormal), lightDir), 0.0, 1.0);
 	
 	outputColor = (diffuseColor * lightIntensity * cosAngIncidence) + (diffuseColor * ambientIntensity);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example2/example10.2.FragLighting_PCN.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 	
 	modelSpacePosition = position;
 	vertexNormal = normal;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example2/example10.2.FragLighting_PN.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 	
 	vertexNormal = normal;
 	modelSpacePosition = position;
-	diffuseColor = vec4(1);
+	diffuseColor = vec4(1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example2/example10.2.Transform.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example2/example10.2.VertexLighting_PCN.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 	
 	vec3 dirToLight = normalize(modelSpaceLightPos - position);
 	
 	float cosAngIncidence = dot(normal, dirToLight);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	interpColor = (lightIntensity * cosAngIncidence * inDiffuseColor) + (ambientIntensity * inDiffuseColor);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example2/example10.2.VertexLighting_PN.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 	
 	vec3 dirToLight = normalize(modelSpaceLightPos - position);
 	
 	float cosAngIncidence = dot(normal, dirToLight);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	interpColor = lightIntensity * cosAngIncidence + ambientIntensity;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example3/Example10_3.java

 	private boolean drawColoredCyl, drawLight, scaleCyl, useRSquare;
 	
 	public Example10_3() {
-		super("Example 10.3", 500, 500, true);
+		super("Example 10.3 - Fragment Attenuation", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example3/example10.3.FragLightAtten.frag

 vec3 CalcCameraSpacePosition()
 {
 	vec4 ndcPos;
-	ndcPos.xy = ((gl_FragCoord.xy / windowSize.xy) * 2) - 1;
-	ndcPos.z = (2 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far) / (gl_DepthRange.far - gl_DepthRange.near);
-	ndcPos.w = 1;
+	ndcPos.xy = ((gl_FragCoord.xy / windowSize.xy) * 2.0) - 1.0;
+	ndcPos.z = (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far) / (gl_DepthRange.far - gl_DepthRange.near);
+	ndcPos.w = 1.0;
 	
 	vec4 clipPos = ndcPos / gl_FragCoord.w;
 	
 	
 	float distFactor = useRSquare ? lightDistanceSqr : sqrt(lightDistanceSqr);
 	
-	return lightIntensity / (1 + lightAttenuation * distFactor);
+	return lightIntensity / (1.0 + lightAttenuation * distFactor);
 }
 
 void main()
 {
 	vec3 cameraSpacePosition = CalcCameraSpacePosition();
 	
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	vec4 attenIntensity = ApplyLightIntensity(cameraSpacePosition, lightDir);
 	
-	float cosAngIncidence = clamp(dot(normalize(vertexNormal), lightDir), 0, 1);
+	float cosAngIncidence = clamp(dot(normalize(vertexNormal), lightDir), 0.0, 1.0);
 	
 	outputColor = (diffuseColor * attenIntensity * cosAngIncidence) + (diffuseColor * ambientIntensity);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example3/example10.3.FragLightAtten_PCN.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 	
 	vertexNormal = normalModelToCameraMatrix * normal;
 	diffuseColor = inDiffuseColor;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example3/example10.3.FragLightAtten_PN.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 	
 	vertexNormal = normalModelToCameraMatrix * normal;
-	diffuseColor = vec4(1);
+	diffuseColor = vec4(1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter10/example3/example10.3.Transform.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/Example11_1.java

 
 import com.ra4king.opengl.GLProgram;
 import com.ra4king.opengl.util.Mesh;
-import com.ra4king.opengl.util.ShaderProgram;
-import com.ra4king.opengl.util.Timer;
-import com.ra4king.opengl.util.Utils;
 import com.ra4king.opengl.util.MousePoles.MouseButton;
 import com.ra4king.opengl.util.MousePoles.ObjectData;
 import com.ra4king.opengl.util.MousePoles.ObjectPole;
 import com.ra4king.opengl.util.MousePoles.ViewData;
 import com.ra4king.opengl.util.MousePoles.ViewPole;
 import com.ra4king.opengl.util.MousePoles.ViewScale;
+import com.ra4king.opengl.util.ShaderProgram;
+import com.ra4king.opengl.util.Timer;
+import com.ra4king.opengl.util.Utils;
 import com.ra4king.opengl.util.math.Matrix3;
 import com.ra4king.opengl.util.math.Matrix4;
 import com.ra4king.opengl.util.math.MatrixStack;
 	private Vector4 lightColor = new Vector4(1);
 	
 	public Example11_1() {
-		super("Example 11.1", 500, 500, true);
+		super("Example 11.1 - Phong Lighting", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.NoPhong.frag

 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return lightIntensity / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return lightIntensity / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	vec4 attenIntensity = ApplyLightIntensity(cameraSpacePosition, lightDir);
 	
 	float cosAngIncidence = dot(normalize(vertexNormal), lightDir);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	outputColor = diffuseColor * attenIntensity * cosAngIncidence + diffuseColor * ambientIntensity;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PCN.vert

 
 void main()
 {
-	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1);
+	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1.0);
 	gl_Position = cameraToClipMatrix * tempCamPosition;
 	
 	vertexNormal = normalModelToCameraMatrix * normal;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PN.vert

 
 void main()
 {
-	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1);
+	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1.0);
 	gl_Position = cameraToClipMatrix * tempCamPosition;
 	
 	vertexNormal = normalModelToCameraMatrix * normal;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PhongLighting.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	vec3 surfaceNormal = normalize(vertexNormal);
 	float cosAngIncidence = dot(surfaceNormal, lightDir);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	vec3 viewDirection = normalize(-cameraSpacePosition);
 	vec3 reflectDir = reflect(-lightDir, surfaceNormal);
 	float phongTerm = dot(viewDirection, reflectDir);
-	phongTerm = clamp(phongTerm, 0, 1);
+	phongTerm = clamp(phongTerm, 0.0, 1.0);
 	phongTerm = cosAngIncidence != 0.0 ? phongTerm : 0.0;
 	phongTerm = pow(phongTerm, shininessFactor);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PhongOnly.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	vec3 viewDirection = normalize(-cameraSpacePosition);
 	vec3 reflectDir = normalize(reflect(-lightDir, surfaceNormal));
 	float phongTerm = dot(viewDirection, reflectDir);
-	phongTerm = clamp(phongTerm, 0, 1);
+	phongTerm = clamp(phongTerm, 0.0, 1.0);
 	phongTerm = dot(surfaceNormal, lightDir) > 0.0 ? phongTerm : 0.0;
 	phongTerm = pow(phongTerm, shininessFactor);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example2/Example11_2.java

 	private Vector4 lightColor = new Vector4(1);
 	
 	public Example11_2() {
-		super("Example 11.2", 500, 500, true);
+		super("Example 11.2 - Blinn vs. Phong Lighting", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example2/example11.2.BlinnLighting.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1/ (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0/ (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main() {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	vec3 surfaceNormal = normalize(vertexNormal);
 	float cosAngIncidence = dot(surfaceNormal, lightDir);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	vec3 viewDirection = normalize(-cameraSpacePosition);
 	
 	vec3 halfAngle = normalize(lightDir + viewDirection);
 	float blinnTerm = dot(surfaceNormal, halfAngle);
-	blinnTerm = clamp(blinnTerm, 0, 1);
+	blinnTerm = clamp(blinnTerm, 0.0, 1.0);
 	blinnTerm = cosAngIncidence != 0.0 ? blinnTerm : 0.0;
 	blinnTerm = pow(blinnTerm, shininessFactor);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example2/example11.2.BlinnOnly.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	
 	vec3 halfAngle = normalize(lightDir + viewDirection);
 	float blinnTerm = dot(surfaceNormal, halfAngle);
-	blinnTerm = clamp(blinnTerm, 0, 1);
+	blinnTerm = clamp(blinnTerm, 0.0, 1.0);
 	blinnTerm = dot(surfaceNormal, lightDir) >= 0.0 ? blinnTerm : 0.0;
 	blinnTerm = pow(blinnTerm, shininessFactor);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example2/example11.2.PCN.vert

 
 void main()
 {
-	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1);
+	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1.0);
 	gl_Position = cameraToClipMatrix * tempCamPosition;
 	
 	vertexNormal = normalModelToCameraMatrix * normal;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example2/example11.2.PN.vert

 
 void main()
 {
-	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1);
+	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1.0);
 	gl_Position = cameraToClipMatrix * tempCamPosition;
 	
 	vertexNormal = normalModelToCameraMatrix * normal;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example2/example11.2.PhongLighting.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	vec3 surfaceNormal = normalize(vertexNormal);
 	float cosAngIncidence = dot(surfaceNormal, lightDir);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	vec3 viewDirection = normalize(-cameraSpacePosition);
 	vec3 reflectDir = reflect(-lightDir, surfaceNormal);
 	float phongTerm = dot(viewDirection, reflectDir);
-	phongTerm = clamp(phongTerm, 0, 1);
+	phongTerm = clamp(phongTerm, 0.0, 1.0);
 	phongTerm = cosAngIncidence != 0.0 ? phongTerm : 0.0;
 	phongTerm = pow(phongTerm, shininessFactor);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example2/example11.2.PhongOnly.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	vec3 viewDirection = normalize(-cameraSpacePosition);
 	vec3 reflectDir = normalize(reflect(-lightDir, surfaceNormal));
 	float phongTerm = dot(viewDirection, reflectDir);
-	phongTerm = clamp(phongTerm, 0, 1);
+	phongTerm = clamp(phongTerm, 0.0, 1.0);
 	phongTerm = dot(surfaceNormal, lightDir) > 0.0 ? phongTerm : 0.0;
 	phongTerm = pow(phongTerm, shininessFactor);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example2/example11.2.PosTransform.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/Example11_3.java

 	private Vector4 lightColor = new Vector4(1);
 	
 	public Example11_3() {
-		super("Example 11.3", 500, 500, true);
+		super("Example 11.3 - Gaussian Specular Lighting", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.BlinnLighting.frag

-#version 330
-
-in vec4 diffuseColor;
-in vec3 vertexNormal;
-in vec3 cameraSpacePosition;
-
-out vec4 outputColor;
-
-uniform vec4 lightIntensity;
-uniform vec4 ambientIntensity;
-
-uniform vec3 cameraSpaceLightPos;
-
-uniform float lightAttenuation;
-
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
-uniform float shininessFactor;
-
-float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
-{
-	vec3 lightDifference = cameraSpaceLightPos - cameraSpacePosition;
-	float lightDistanceSqr = dot(lightDifference, lightDifference);
-	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
-	
-	return 1/ (1 + lightAttenuation * sqrt(lightDistanceSqr));
-}
-
-void main() {
-	vec3 lightDir = vec3(0);
-	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
-	vec4 attenIntensity = atten * lightIntensity;
-	
-	vec3 surfaceNormal = normalize(vertexNormal);
-	float cosAngIncidence = dot(surfaceNormal, lightDir);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
-	
-	vec3 viewDirection = normalize(-cameraSpacePosition);
-	
-	vec3 halfAngle = normalize(lightDir + viewDirection);
-	float blinnTerm = dot(surfaceNormal, halfAngle);
-	blinnTerm = clamp(blinnTerm, 0, 1);
-	blinnTerm = cosAngIncidence != 0.0 ? blinnTerm : 0.0;
-	blinnTerm = pow(blinnTerm, shininessFactor);
-	
-	outputColor = diffuseColor  * attenIntensity * cosAngIncidence +
-				  specularColor * attenIntensity * blinnTerm 	   +
-				  diffuseColor  * ambientIntensity;
-}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.BlinnOnly.frag

-#version 330
-
-in vec4 diffuseColor;
-in vec3 vertexNormal;
-in vec3 cameraSpacePosition;
-
-out vec4 outputColor;
-
-uniform vec4 lightIntensity;
-uniform vec4 ambientIntensity;
-
-uniform vec3 cameraSpaceLightPos;
-
-uniform float lightAttenuation;
-
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
-uniform float shininessFactor;
-
-float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
-{
-	vec3 lightDifference = cameraSpaceLightPos - cameraSpacePosition;
-	float lightDistanceSqr = dot(lightDifference, lightDifference);
-	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
-	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
-}
-
-void main()
-{
-	vec3 lightDir = vec3(0);
-	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
-	vec4 attenIntensity = atten * lightIntensity;
-	
-	vec3 surfaceNormal = normalize(vertexNormal);
-	
-	vec3 viewDirection = normalize(-cameraSpacePosition);
-	
-	vec3 halfAngle = normalize(lightDir + viewDirection);
-	float blinnTerm = dot(surfaceNormal, halfAngle);
-	blinnTerm = clamp(blinnTerm, 0, 1);
-	blinnTerm = dot(surfaceNormal, lightDir) >= 0.0 ? blinnTerm : 0.0;
-	blinnTerm = pow(blinnTerm, shininessFactor);
-	
-	outputColor = specularColor * attenIntensity * blinnTerm + diffuseColor * ambientIntensity;
-}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.GaussianLighting.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float calcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = calcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	vec3 surfaceNormal = normalize(vertexNormal);
 	float cosAngIncidence = dot(surfaceNormal, lightDir);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	vec3 viewDirection = normalize(-cameraSpacePosition);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.GaussianOnly.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float calcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = calcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.PCN.vert

 
 void main()
 {
-	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1);
+	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1.0);
 	gl_Position = cameraToClipMatrix * tempCamPosition;
 	
 	vertexNormal = normalModelToCameraMatrix * normal;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.PN.vert

 
 void main()
 {
-	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1);
+	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1.0);
 	gl_Position = cameraToClipMatrix * tempCamPosition;
 	
 	vertexNormal = normalModelToCameraMatrix * normal;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.PhongLighting.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	vec3 surfaceNormal = normalize(vertexNormal);
 	float cosAngIncidence = dot(surfaceNormal, lightDir);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);
 	
 	vec3 viewDirection = normalize(-cameraSpacePosition);
 	vec3 reflectDir = reflect(-lightDir, surfaceNormal);
 	float phongTerm = dot(viewDirection, reflectDir);
-	phongTerm = clamp(phongTerm, 0, 1);
+	phongTerm = clamp(phongTerm, 0.0, 1.0);
 	phongTerm = cosAngIncidence != 0.0 ? phongTerm : 0.0;
 	phongTerm = pow(phongTerm, shininessFactor);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.PhongOnly.frag

 
 uniform float lightAttenuation;
 
-const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1.0);
 uniform float shininessFactor;
 
 float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
 	float lightDistanceSqr = dot(lightDifference, lightDifference);
 	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
 	
-	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+	return 1.0 / (1.0 + lightAttenuation * sqrt(lightDistanceSqr));
 }
 
 void main()
 {
-	vec3 lightDir = vec3(0);
+	vec3 lightDir = vec3(0.0);
 	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
 	vec4 attenIntensity = atten * lightIntensity;
 	
 	vec3 viewDirection = normalize(-cameraSpacePosition);
 	vec3 reflectDir = normalize(reflect(-lightDir, surfaceNormal));
 	float phongTerm = dot(viewDirection, reflectDir);
-	phongTerm = clamp(phongTerm, 0, 1);
+	phongTerm = clamp(phongTerm, 0.0, 1.0);
 	phongTerm = dot(surfaceNormal, lightDir) > 0.0 ? phongTerm : 0.0;
 	phongTerm = pow(phongTerm, shininessFactor);
 	

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example3/example11.3.PosTransform.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter12/example1/Example12_1.java

 import com.ra4king.opengl.arcsynthesis.gl33.chapter12.Scene.ProgramData;
 import com.ra4king.opengl.arcsynthesis.gl33.chapter12.Scene.ProgramStore;
 import com.ra4king.opengl.util.MousePoles.MouseButton;
-import com.ra4king.opengl.util.ShaderProgram;
-import com.ra4king.opengl.util.Utils;
 import com.ra4king.opengl.util.MousePoles.ViewData;
 import com.ra4king.opengl.util.MousePoles.ViewPole;
 import com.ra4king.opengl.util.MousePoles.ViewScale;
+import com.ra4king.opengl.util.ShaderProgram;
 import com.ra4king.opengl.util.Timer.Type;
+import com.ra4king.opengl.util.Utils;
 import com.ra4king.opengl.util.math.Matrix4;
 import com.ra4king.opengl.util.math.MatrixStack;
 import com.ra4king.opengl.util.math.Quaternion;
 	private boolean drawCameraPos, drawLights = true;
 	
 	public Example12_1() {
-		super("Example 12.1", 500, 500, true);
+		super("Example 12.1 - Scene Lighting", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter2/example1/Example2_1.java

 	private int vbo;
 	
 	public Example2_1() {
-		super("Example 2.1", 500, 500, true);
+		super("Example 2.1 - Fragment Position", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter2/example1/example2.1.frag

 
 void main()
 {
-    float lerpValue = gl_FragCoord.y / 600.0f;
+    float lerpValue = gl_FragCoord.y / 600.0;
         
-    outputColor = mix(vec4(1.0f, 1.0f, 1.0f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpValue);
+    outputColor = mix(vec4(1.0, 1.0, 1.0, 1.0), vec4(0.2, 0.2, 0.2, 1.0), lerpValue);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter2/example2/Example2_2.java

 	private int vbo;
 	
 	public Example2_2() {
-		super("Example 2.2", 500, 500, true);
+		super("Example 2.2 - Vertex Colors", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example1/Example3_1.java

 	private long elapsedTime;
 	
 	public Example3_1() {
-		super("Example 3.1", 500, 500, true);
+		super("Example 3.1 - CPU Position Offset", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example1/example3.1.frag

 
 void main()
 {
-	outputColor = vec4(1, 1, 1, 1);
+	outputColor = vec4(1.0, 1.0, 1.0, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example2/Example3_2.java

 	private long elapsedTime;
 	
 	public Example3_2() {
-		super("Example 3.2", 500, 500, true);
+		super("Example 3.2 - Vertex Position Offset", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example2/example3.2.frag

 
 void main()
 {
-	outputColor = vec4(1, 1, 1, 1);
+	outputColor = vec4(1.0, 1.0, 1.0, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example2/example3.2.vert

 
 void main()
 {
-	gl_Position = position + vec4(offset, 0, 0);
+	gl_Position = position + vec4(offset, 0.0, 0.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example3/Example3_3.java

 	private long elapsedTime;
 	
 	public Example3_3() {
-		super("Example 3.3", 500, 500, true);
+		super("Example 3.3 - Vertex Calc Offset", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example3/example3.3.frag

 
 void main()
 {
-	outputColor = vec4(1, 1, 1, 1);
+	outputColor = vec4(1.0, 1.0, 1.0, 1.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example3/example3.3.vert

 
 void main()
 {
-	float timeScale = 3.14159f * 2.0f / loopDuration;
+	float timeScale = 3.14159 * 2.0 / loopDuration;
 	
 	float currTime = mod(time, loopDuration);
 	
-	gl_Position = position + vec4(cos(currTime * timeScale) * 0.5f,
-								  sin(currTime * timeScale) * 0.5f,
-								  0.0f,
-								  0.0f);
+	gl_Position = position + vec4(cos(currTime * timeScale) * 0.5,
+								  sin(currTime * timeScale) * 0.5,
+								  0.0,
+								  0.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example4/Example3_4.java

 	private long elapsedTime;
 	
 	public Example3_4() {
-		super("Example 3.4", 500, 500, true);
+		super("Example 3.4 - Frag Change Color", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example4/example3.4.frag

 uniform float fragLoopDuration;
 uniform float time;
 
-const vec4 firstColor = vec4(1, 1, 1, 1);
-const vec4 secondColor = vec4(0, 1, 0, 1);
+const vec4 firstColor = vec4(1.0, 1.0, 1.0, 1.0);
+const vec4 secondColor = vec4(0.0, 1.0, 0.0, 1.0);
 
 void main()
 {

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter3/example4/example3.4.vert

 
 void main()
 {
-	float timeScale = 3.14159f * 2.0f / loopDuration;
+	float timeScale = 3.14159 * 2.0 / loopDuration;
 	
 	float currTime = mod(time, loopDuration);
 	
-	gl_Position = position + vec4(cos(currTime * timeScale) * 0.5f,
-								  sin(currTime * timeScale) * 0.5f,
-								  0.0f,
-								  0.0f);
+	gl_Position = position + vec4(cos(currTime * timeScale) * 0.5,
+								  sin(currTime * timeScale) * 0.5,
+								  0.0,
+								  0.0);
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example1/Example4_1.java

 	private int vbo;
 	
 	public Example4_1() {
-		super("Example 4.1", 500, 500, true);
+		super("Example 4.1 - Orthographic Cube", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example1/example4.1.vert

 
 void main()
 {
-	gl_Position = position + vec4(offset, 0, 0);
+	gl_Position = position + vec4(offset, 0.0, 0.0);
 	theColor = color;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example2/Example4_2.java

 	private int vbo;
 	
 	public Example4_2() {
-		super("Example 4.2", 500, 500, true);
+		super("Example 4.2 - Shader Perspective", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example2/example4.2.vert

 
 void main()
 {
-	vec4 cameraPos = position + vec4(offset, 0, 0);
+	vec4 cameraPos = position + vec4(offset, 0.0, 0.0);
 	vec4 clipPos;
 	
 	clipPos.xy = cameraPos.xy * frustumScale;

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example3/Example4_3.java

 	private int vbo;
 	
 	public Example4_3() {
-		super("Example 4.3", 500, 500, true);
+		super("Example 4.3 - Matrix Perspective", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example3/example4.3.vert

 
 void main()
 {
-	gl_Position = perspectiveMatrix * (position + vec4(offset, 0, 0));
+	gl_Position = perspectiveMatrix * (position + vec4(offset, 0.0, 0.0));
 	theColor = color;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example4/Example4_4.java

 	private float frustumScale = 1;
 	
 	public Example4_4() {
-		super("Example 4.4", 500, 500, true);
+		super("Example 4.4 - Aspect Ratio", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter4/example4/example4.4.vert

 
 void main()
 {
-	gl_Position = perspectiveMatrix * (position + vec4(offset, 0, 0));
+	gl_Position = perspectiveMatrix * (position + vec4(offset, 0.0, 0.0));
 	theColor = color;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example1/Example5_1.java

 	private float frustumScale = 1;
 	
 	public Example5_1() {
-		super("Example 5.1", 500, 500, true);
+		super("Example 5.1 - Overlap No Depth", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example1/example5.1.vert

 
 void main()
 {
-	gl_Position = perspectiveMatrix * (position + vec4(offset, 0));
+	gl_Position = perspectiveMatrix * (position + vec4(offset, 0.0));
 	theColor = color;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example2/Example5_2.java

 	private float frustumScale = 1;
 	
 	public Example5_2() {
-		super("Example 5.2", 500, 500, true);
+		super("Example 5.2 - Base Vertex Overlap", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example2/example5.2.vert

 
 void main()
 {
-	gl_Position = perspectiveMatrix * (position + vec4(offset, 0));
+	gl_Position = perspectiveMatrix * (position + vec4(offset, 0.0));
 	theColor = color;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example3/Example5_3.java

 	private float frustumScale = 1;
 	
 	public Example5_3() {
-		super("Example 5.3", 500, 500, true);
+		super("Example 5.3 - Depth Buffer", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example3/example5.3.vert

 
 void main()
 {
-	gl_Position = perspectiveMatrix * (position + vec4(offset, 0));
+	gl_Position = perspectiveMatrix * (position + vec4(offset, 0.0));
 	theColor = color;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example4/Example5_4.java

 	private float frustumScale = 1;
 	
 	public Example5_4() {
-		super("Example 5.4", 500, 500, true);
+		super("Example 5.4 - Vertex Clipping", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example4/example5.4.vert

 
 void main()
 {
-	gl_Position = perspectiveMatrix * (position + vec4(offset, 0));
+	gl_Position = perspectiveMatrix * (position + vec4(offset, 0.0));
 	theColor = color;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example5/Example5_5.java

 	private float frustumScale = 1;
 	
 	public Example5_5() {
-		super("Example 5.5", 500, 500, true);
+		super("Example 5.5 - Depth Clamping", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter5/example5/example5.5.vert

 
 void main()
 {
-	gl_Position = perspectiveMatrix * (position + vec4(offset, 0));
+	gl_Position = perspectiveMatrix * (position + vec4(offset, 0.0));
 	theColor = color;
 }

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter6/example1/Example6_1.java

 	private long elapsedTime;
 	
 	public Example6_1() {
-		super("Example 6.1", 500, 500, true);
+		super("Example 6.1 - Translation", 500, 500, true);
 	}
 	
 	private float calculateFrustumScale(float angle) {

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter6/example2/Example6_2.java

 	private long elapsedTime;
 	
 	public Example6_2() {
-		super("Example 6.2", 500, 500, true);
+		super("Example 6.2 - Scale", 500, 500, true);
 	}
 	
 	private float calculateFrustumScale(float angle) {

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter6/example3/Example6_3.java

 	private long elapsedTime;
 	
 	public Example6_3() {
-		super("Example 6.3", 500, 500, true);
+		super("Example 6.3 - Rotation", 500, 500, true);
 	}
 	
 	private float calculateFrustumScale(float angle) {

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter6/example4/Example6_4.java

 	private int vao;
 	
 	public Example6_4() {
-		super("Example 6.4", 500, 500, true);
+		super("Example 6.4 - Hierarchy", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter7/example1/Example7_1.java

 	private boolean drawLookAtPoint = true;
 	
 	public Example7_1() {
-		super("Example 7.1", 500, 500, true);
+		super("Example 7.1 - World Scene", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter7/example2/Example7_2.java

 	private boolean drawLookAtPoint = true;
 	
 	public Example7_2() {
-		super("Example 7.2", 500, 500, true);
+		super("Example 7.2 - World With UBO", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example1/Example8_1.java

 	private boolean drawGimbals = true;
 	
 	public Example8_1() {
-		super("Example 8.1", 500, 500, true);
+		super("Example 8.1 - Gimbal Lock", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example2/Example8_2.java

 	private boolean rightMultiply = true;
 	
 	public Example8_2() {
-		super("Example 8.2", 500, 500, true);
+		super("Example 8.2 - Quaternion YPR", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example3/Example8_3.java

 	private OffsetRelative offsetRelative = OffsetRelative.MODEL_RELATIVE;
 	
 	public Example8_3() {
-		super("Example 8.3", 500, 500, true);
+		super("Example 8.3 - Camera Relative", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example4/Example8_4.java

 	};
 	
 	public Example8_4() {
-		super("Example 8.4", 500, 500, true);
+		super("Example 8.4 - Interpolation", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter9/example1/Example9_1.java

 	private boolean drawColoredCyl = true;
 	
 	public Example9_1() {
-		super("Example 9.1", 500, 500, true);
+		super("Example 9.1 - Basic Lighting", 500, 500, true);
 	}
 	
 	@Override

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter9/example1/example9.1.VertexLighting_PCN.vert

 
 void main()
 {
-	gl_Position = cameraToClipMatrix * (modelToCameraMatrix * vec4(position, 1));
+	gl_Position = cameraToClipMatrix * (modelToCameraMatrix * vec4(position, 1.0));
 	
 	vec3 normCamSpace = normalize(normalModelToCameraMatrix * normal);
 	
 	float cosAngIncidence = dot(normCamSpace, dirToLight);
-	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	cosAngIncidence = clamp(cosAngIncidence, 0.0, 1.0);