Search Issue Tracker
Rectangle Shape Area Light generates a circle around the rectangle shape
1. Open the attached “ProjectY.zip“ project
2. Open “Rectangle_Area_Light_Is_A_Circle” scene
3. Observe the Scene window
Expected result: Rectangle Shape Area Light appears as a rectangle in the Scene window
Actual result: Rectangle Shape Area Light appears as a rectangle inside a bigger circle in the Scene window
Reproducible with: 2020.3.45f1, 2021.3.18f1, 2022.2.6f1, 2023.1.0b3, 2023.2.0a1
Reproduced on: macOS Monterey 12.6 (Intel)
Note: Also reproducible in Build
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Texture Importer: Swaps red and blue channels
- Parallax mapping with UVs set other than UV0 plugged into sample texture 2d produces an error
- Objects with single letter name won't show up in hierarchy search results
- The GameObject is not transparent when setting CameraDepthTexture as a depth render target
- SRP Lens Flares with Occlusion enabled inconsistently shine through objects
There are multiple issues at play here.
Area lights are subjected to a range in order to optimize for baking them. In reality they have infinite range. But at some point the contribution of an area light becomes infinitessimal when you are far enough away from it. For such areas we will disregard the light for the GI calculation. So you need to set the range of the light big enough that it is not cut off too early. The range is spherical hence the apparent cutoff will be circular when projected to a surface. HDRP fades out near to the light range rather than having an abrupt cut-off.
Second the area light emits light in all directions in a hemisphere oriented above the light surface. This means that the shape of the light will only be pronounced when close to the surface. This is because the solid angle to the light is inversely proportional to the distance to the light. When the distance to the light is high, the intensity of the light is proportional to the solid angle and when the distance to the light is high, points on the surface will receive similar intensity. Only when the light is close to the surface will there be a significant difference in solid angle between adjacent points on the surface. Hence the light will appear more circular when further from the surface. See https://imgur.com/Ll1HrLj.gif
If you want a box like light then use the Box or Pyramid spot light in HDRP. See https://imgur.com/6dX7T2b.gif
I can't say for sure but I expect that the light in Bakery in your screenshot (https://jira.unity3d.com/secure/attachment/680342/image%20%28e6624f82-084b-4fc1-857b-540aaff7d0dd%29.png) is a box spot light. Either that or the light computed by Bakery is incorrect.