Home | Documentation | Atomic Chat | Github

Shadow distance seems too much


My shadows are weird

Something I have noticed when applying shadows to my nodes, is that the shadows seem kinda off. Like the shadow distance is just a tad too much.

Kind of hard to explain, but here’s a gif:

I’m perfectly sure that the cube is aligned to the ground. Changing the “Shadow Distance” value makes the shadow disappear, is that how it’s supposed to be?

Thanks in advance =)))


Can you fork https://github.com/AtomicGameEngine/AtomicTests and create a basic project with this scene to look at in a subfolder?


@christoffer There should be a shadow bias option, although if you have it top low you will get banding artifacts, the offset is just an artifact of shadowing techniques.


The official term is “peter-panning” :wink: is this in WebGL or mobile? I think it’s a lot more pronounced on these platforms compared to desktop due to some missing features and lower bit depth.


@boberfly thats the term i couldnt remember. Thanks :slight_smile:


@JoshEngebretson I downloaded that, used the MemoryLeaks project, and recreated the issue in there, still the same thing. Not sure that’s what you instructed me to do, but I’m a little stupid =)

@dragonCASTjosh There’s one called “LOD Bias”, which doesn’t really do anything.

@boberfly This is on desktop.

I don’t know anything about shadowing techniques and all that, it’s just something I noticed and thought was maybe worth looking into :camel:

And peter-panning is a goddamn great name :airplane:


its called depth constant bias i believe


@dragonCASTjosh I can’t find anything called Depth Constant Bias…

This peter-panning thing is something that has always happened in my projects… not sure why.


its closer to the bottom to the list, try scroll down. Also it will happen in every engine as its just a side effect of the current shadowing technique used in realtime rendering.


Old threat but when I did shadow mapping ages ago, I noticed that setting camera frustum’s near-plane higher, then shadows looks better (and far-plane isnt too high). But I didnt use csm/pssm which urho uses so maybe this post isnt relevant.