Skip to content

Specular lighting functions unexpectedly with orthogonal camera #108154

Open
@kvu787

Description

@kvu787

Tested versions

Reproducible in 4.5-beta1 and 4.4.1-stable

System information

Godot v4.4.1.stable - Windows 11 (build 26100) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Ti (NVIDIA; 32.0.15.7680) - 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz (16 threads)

Issue description

Setup

I created a simple scene with 1 directional light, 3 spheres, and 1 orthogonal camera. It looks like this:

Image

Expected

I expect it to look like the below screenshot from Unity3D in which the specular lighting is produced by a sunlight at a very far distance.

Image

Actual

However, in Godot, I get the below screenshot in which the specular lighting appears to be produced by a sunlight at a very close distance.

Image

Related

This Reddit post seems to describe the same issue: https://www.reddit.com/r/godot/comments/sx79di/incorrect_3d_lighting_with_orthogonal_camera_vs/

The poster works around the issue by moving the orthogonal camera very far away. However, this workaround is unsuitable for my use case because it degrades the shadow quality significantly.

Steps to reproduce

  1. Download, extract, and open LightingIssueRepro.zip in Godot 4.5-beta1 or 4.4.1-stable.
  2. Click "Run project" or press F5.
  3. See the three blue spheres with misaligned specular lighting.

Minimal reproduction project (MRP)

LightingIssueRepro.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions