Typo fixed

This commit is contained in:
Antoine Pilote
2024-08-28 23:57:39 -04:00
parent 0915b52327
commit cf7d236540
2 changed files with 10 additions and 7 deletions

View File

@@ -1001,7 +1001,9 @@ namespace Nuake
{
auto [transform, light, parent] = view.get<TransformComponent, LightComponent, ParentComponent>(l);
if (light.Type == Directional && light.SyncDirectionWithSky)
if (light.Type == Directional)
{
if (light.SyncDirectionWithSky)
{
light.Direction = env->ProceduralSkybox->GetSunDirection();
}
@@ -1009,6 +1011,7 @@ namespace Nuake
{
light.Direction = transform.GetGlobalRotation() * Vector3(0, 0, 1);
}
}
Vector3 lightPosition = transform.GetGlobalPosition();
float distanceFromCam = glm::length(camPosition - lightPosition);

View File

@@ -309,7 +309,7 @@ void main()
if(u_DirectionalLight.Shadow > 0.1f)
{
shadow = ShadowCalculation(worldPos, N);
shadow += ShadowCalculation(worldPos, N);
}
vec3 radiance = u_DirectionalLight.Color * attenuation * shadow;