Point Lights behaving strangely on Tile Maps/Sprites when in Forward Rendering(4.24)

I’m trying to get lighting working using Forward Rendering on tilemaps/sprites but for some reason point lights seem to not light in a sphere. Anyone have any clues as to why? Here is a re-creation of the problem using the 2D template.

To repro:

  1. Enable Forward Rendering in Project Settings

  2. Remove the min screen radius for lights (set to 0.0f)

  3. Change all tile map materials to the default lit engine material (this is just a normal lit material taking in vertex color with some constants for roughness/spec)

  4. Place a point light in your scene and observe that only half of point light is lighting as if it was a spot light.

I’ve attached some images of the issue of the front and backside. Note the pivot point is the same for both pictures. This showcases that on the front side of the sprite the point light is not lighting above the pivot where on the back it is but wont light below the pivot. Would love some help on this issue.

296300-frontfrlittilemap.png

296321-backfrlittilemap.png

Via @heavy_bullets on twitter:
Thats a bug on the engine code, I already submitted a fix for that, but it has to be reviewed.
On our game we created a custom material that has world aligned normals pointing to the camera for the tome being.
The issue is wrong tangents on the vertex factory btw

On how this bug affects normal maps:
Normal maps usually use Tangent space, which is local to the object itself.
The issue is that the tangents are already badly aligned, so the normals will be by result
In this case (2d specific case) we can point the normals and tangents toward the camera

Proposed solution:


Link to twitter thread:

thank you it works well !

It works pretty well! Thank you for resolving the issue in such a simple way!