• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Stable Feedback
  • /DZG-2727
Back
1

Rendering / shadow cascades / static (WRP) map objects

BugGraphics
1

State

Assigned
Issue key
DZG-2727
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
crazyjesus
Created
Nov 11, 2026
Views
5
Platform
PC Steam
What happened?

Shadows cast by static map objects (objects placed in the terrain WRP: tents, camo nets, buildings, trees, etc.) vanish as soon as the casting object leaves the camera view frustum, even though its shadow is still inside the view. The shadow comes back only when the caster re-enters the view. With the sun (or moon) beside or behind the player, looking forward or down, shadows on the ground in front of the player pop in and out while turning the head.

Reproduction steps

1. Chernarus, clear weather, low sun (e.g. 17:00 in summer, sun elevation ~20°).

2. Stand next to static map objects that cast long shadows, e.g. the military camp with big tents and a camo net at about X 13637, Z 13750.

3. Turn so that the sun is to the side or behind you (more than ~75–110° from the view direction) and look forward or down at the ground where the tent/net shadow lies.

4. Slowly turn the camera so the tent/net itself leaves the screen while its shadow stays on screen.

Actual: the shadow disappears the moment the caster is off-screen. Standing still does not bring it back; only turning back until the caster is visible again does.

Expected: a directional-light shadow is visible wherever it falls in the view, whether or not the caster itself is visible.

## Analysis (DayZDiag_x64.exe 1.30.164289, addresses with image base 0x140000000)

- Shadow-caster gathering walks a ring of cells around the camera 0x140830a20) and, for static map objects, calls 0x1408336b0 → 0x1406794d0.

- In 0x1406794d0 each object is tested against the camera view frustum (plane set this+0xd78). For an object outside the view, the conditional jump at 0x1406799c0 ja, bytes 77 70) marks it as "out of view" (main LOD = 0x7F).

- Such objects never end up drawn into the sun shadow cascades, so their shadows are lost.

- The engine already computes a frustum extruded toward the light 0x1404278f0) for shadow purposes, but this object-level path still relies on the plain view-frustum classification.

## Verification

Patching only that jump in a running DayZDiag 0x1406799c0: 77 70 → 90 90, i.e. map objects are never classified "out of view") makes all static-object shadows stable at every camera angle. Nothing else was changed. Control: forcing the cascade-mask function 0x140385180 to always return 0 removes all object shadows, confirming this is the live caster path. Entity casters 0x140697140) and cell classification 0x1408329b0) were tested separately and are not involved for these objects.

The probable equivalent in retail DayZ_x64.exe 1.30.164289 is the jump at 0x14060f4fe (bytes 77 76, function 0x14060f0d0). We did not test the retail exe.

Exact build version (optional)
1.30.164289
Where did it happen?
Official
Is it modded?
No
Expected result

Classify shadow casters against the light-extruded view volume (or each cascade's light-space volume) instead of the plain view frustum, so an object whose shadow reaches the view keeps a valid LOD and is rendered into the cascades. This only adds the few objects whose shadow actually enters the view, so the performance cost should be small.

Public attachments2 files · visible to everyone

image1.webp

63 KB

image.webp

128 KB

Reactions

Activity

    23 minutes ago
  • crazyjesus
    created issue23 minutes ago
  • l909
    changed state to
    ASSIGNED
    8 minutes ago

You are not signed in. Please sign in to see more details and to reply.

State

Assigned
Issue key
DZG-2727
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
crazyjesus
Created
Nov 11, 2026
Views
5