Skip to content
Permalink
Browse files

Fix wrong directional light direction

  • Loading branch information
dpjudas committed Mar 18, 2020
1 parent 5552b51 commit d18e89ea7296d3d9336e329310aed5a37f2b86e0
@@ -37,7 +37,7 @@ vec3 lightContribution(int i, vec3 normal)

float lightLevelContrastAttenuation(vec3 normal)
{
vec3 lightdir = vec3(0.55708601453, -0.7427813527, 0.37139067635);
vec3 lightdir = vec3(-0.55708601453, 0.7427813527, -0.37139067635);
return clamp(dot(lightdir, normal), 0.0, 1.0);
}

@@ -84,7 +84,7 @@ vec3 ProcessMaterialLight(Material material, vec3 ambientLight)
{
float lightLevelContrastStrength = 0.25;

vec3 L = vec3(0.55708601453, -0.7427813527, 0.37139067635);
vec3 L = vec3(-0.55708601453, 0.7427813527, -0.37139067635);
float attenuation = clamp(dot(N, L), 0.0, 1.0);
if (attenuation > 0.0)
{
@@ -36,7 +36,7 @@ vec2 lightAttenuation(int i, vec3 normal, vec3 viewdir, float lightcolorA)

vec2 lightLevelContrastAttenuation(vec3 normal, vec3 viewdir)
{
vec3 lightdir = vec3(0.55708601453, -0.7427813527, 0.37139067635);
vec3 lightdir = vec3(-0.55708601453, 0.7427813527, -0.37139067635);
float attenuation = clamp(dot(lightdir, normal), 0.0, 1.0);

float glossiness = uSpecularMaterial.x;

0 comments on commit d18e89e

Please sign in to comment.
You can’t perform that action at this time.