View Issue Details

IDProjectCategoryView StatusLast Update
0006126Spring engineLuapublic2019-01-30 14:50
ReporterDoo Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status newResolutionopen 
Summary0006126: Moving Sun via Spring.SetSunDirection() casts a black "hole" in the skybox
DescriptionMoving the sun via Spring.SetSunDirection() on every update (following a day/night cycle) causes a black "hole" in the sky box as shown in those images.
On the other hand, the "sunflare" doesn't move at all, while that black hole does and seems to follow the path the sunflare should be taking.

The shadows from units/terrain properly update with the sundir, so it seems it is only affecting the advsky (sunflare/skybox).
Steps To ReproduceYou can reproduce by using this:

sunframe = math.random(0,8500)

function widget:Update(dt)
  sunframe = sunframe + dt/4
  if sunframe then
    Spring.SetSunDirection(math.cos(sunframe/15), 1+math.sin(sunframe/16), math.sin(sunframe/15))
  end
end
TagsNo tags attached.
Attached Files
screen00940.jpg (Attachment missing)
Checked infolog.txt for Errors

Activities

Doo

2019-01-30 14:48

reporter   ~0019699

Looking at https://github.com/spring/spring/blob/bdb71cde67c8d5caf32fdc115f41b017fb1ddace/rts/Rendering/Env/AdvSky.cpp#L49
I see the sundir (and therefor sunflare) only update once on advsky init?
My 1st guess was that the sky is drawn and takes account of the new sundir: leaves a "gap" in which the sun should be drawn and that would be the "hole", while the sunflare itself isn't updated, which leaves an unmoved sunflare.

Doo

2019-01-30 14:50

reporter   ~0019700

I forgot to mention, this is on 104.0.1 - 968, but happened at least since 103.0.

Issue History

Date Modified Username Field Change
2019-01-30 14:44 Doo New Issue
2019-01-30 14:44 Doo File Added: screen00940.jpg
2019-01-30 14:48 Doo Note Added: 0019699
2019-01-30 14:50 Doo Note Added: 0019700