aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorvictorfisac <victorfisac@gmail.com>2016-05-21 18:22:15 +0200
committervictorfisac <victorfisac@gmail.com>2016-05-21 18:22:15 +0200
commitdcd6942ed1ab703625f5c7072cbcfd823c681db7 (patch)
tree26adf20c7a1f71cfc986df22c0f5e15520485ec1 /examples
parentc320a21f2b0e96f7605624e84048ccab9700b516 (diff)
downloadraylib-dcd6942ed1ab703625f5c7072cbcfd823c681db7.tar.gz
raylib-dcd6942ed1ab703625f5c7072cbcfd823c681db7.zip
Fix small bug and spacing
Diffstat (limited to 'examples')
-rw-r--r--examples/resources/shaders/standard.fs14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/resources/shaders/standard.fs b/examples/resources/shaders/standard.fs
index 30c841d2..3c3bef4b 100644
--- a/examples/resources/shaders/standard.fs
+++ b/examples/resources/shaders/standard.fs
@@ -43,7 +43,7 @@ vec3 CalcPointLight(Light l, vec3 n, vec3 v)
// Specular shading
float spec = 0.0;
- if(diff > 0.0)
+ if (diff > 0.0)
{
vec3 h = normalize(-l.direction + v);
spec = pow(dot(n, h), 3 + glossiness);
@@ -61,7 +61,7 @@ vec3 CalcDirectionalLight(Light l, vec3 n, vec3 v)
// Specular shading
float spec = 0.0;
- if(diff > 0.0)
+ if (diff > 0.0)
{
vec3 h = normalize(lightDir + v);
spec = pow(dot(n, h), 3 + glossiness);
@@ -84,7 +84,7 @@ vec3 CalcSpotLight(Light l, vec3 n, vec3 v)
float attenuation = clamp(dot(n, lightToSurface), 0.0, 1.0);
attenuation = dot(lightToSurface, -lightDir);
float lightToSurfaceAngle = degrees(acos(attenuation));
- if(lightToSurfaceAngle > l.coneAngle) attenuation = 0.0;
+ if (lightToSurfaceAngle > l.coneAngle) attenuation = 0.0;
float falloff = (l.coneAngle - lightToSurfaceAngle)/l.coneAngle;
// Combine diffuse and attenuation
@@ -92,7 +92,7 @@ vec3 CalcSpotLight(Light l, vec3 n, vec3 v)
// Specular shading
float spec = 0.0;
- if(diffAttenuation > 0.0)
+ if (diffAttenuation > 0.0)
{
vec3 h = normalize(lightDir + v);
spec = pow(dot(n, h), 3 + glossiness);
@@ -115,13 +115,13 @@ void main()
vec4 texelColor = texture(texture0, fragTexCoord);
vec3 lighting = colAmbient.rgb;
- for(int i = 0; i < lightsCount; i++)
+ for (int i = 0; i < lightsCount; i++)
{
// Check if light is enabled
- if(lights[i].enabled == 1)
+ if (lights[i].enabled == 1)
{
// Calculate lighting based on light type
- switch(lights[i].type)
+ switch (lights[i].type)
{
case 0: lighting += CalcPointLight(lights[i], n, v); break;
case 1: lighting += CalcDirectionalLight(lights[i], n, v); break;