Home Unreal Engine

Dynamic sun lighting issue

I've put together a simple shader for a dynamic sky but there seems to be a problem with my sun.

xkvf3b.jpg

I take the dot product of the camere and light vector multiply by -1 and use that as input in a spheremask.

Does anyone have an idea what the problem could be?

Replies

  • r4ptur3
    Options
    Offline / Send Message
    r4ptur3 polycounter lvl 10
    what seems to be the problem? is it not moving?
  • Shift`
    Options
    Offline / Send Message
    Not really sure what the problem is.

    But if you are talking about the "haze" then:
    Make sure you have your sky dome set to not cast shadows and it also may be caused by light shafts, they are under the dominate directional light settings.
  • wes.sau
    Options
    Offline / Send Message
    The light shafts from the sun are at an angle. For me this is fixed when I make sure the sky sphere is centered around the play space, with a drawscale of 1000 or so, and make sure the trace distance on the dom light is very large, at least as large as the default map templates or even one digit higher, like 1000000000 or whatever.
  • Hellixor
    Options
    Offline / Send Message
    The problem was indeed that the light shafts from the sun were aiming upwards instead of around the sun. Sorry for being so unclear about that.

    Increasing the trace distance fixed it so thank you very much wes.sau :)
Sign In or Register to comment.