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,13 +1001,16 @@ namespace Nuake
{ {
auto [transform, light, parent] = view.get<TransformComponent, LightComponent, ParentComponent>(l); auto [transform, light, parent] = view.get<TransformComponent, LightComponent, ParentComponent>(l);
if (light.Type == Directional && light.SyncDirectionWithSky) if (light.Type == Directional)
{ {
light.Direction = env->ProceduralSkybox->GetSunDirection(); if (light.SyncDirectionWithSky)
} {
else light.Direction = env->ProceduralSkybox->GetSunDirection();
{ }
light.Direction = transform.GetGlobalRotation() * Vector3(0, 0, 1); else
{
light.Direction = transform.GetGlobalRotation() * Vector3(0, 0, 1);
}
} }
Vector3 lightPosition = transform.GetGlobalPosition(); Vector3 lightPosition = transform.GetGlobalPosition();

View File

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