Shadows

Everything about development and the OpenMW source code.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Shadows

Post by scrawl »

I decided to try the 'change the StateGraph for shadow casting to not include pointless textures' idea. Unfortunately, OSG insisted on crashing the moment I changed any of the actual state graph, so I'll have to come back to that later.

The texture unit issue seems to be caused by a hardcoded 'gl_EyePlane[1]' in the shader. Changing that to use the actual texture unit makes everything work for me.
User avatar
AnyOldName3
Posts: 2673
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

Scrawl you beauty that fixes everything! (In theory only as I've not actually tested it.) I missed that as I can't find it ever actually being set in the VDSM code, but if it works, it works.
User avatar
AnyOldName3
Posts: 2673
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

I'm guessing it was all covered up by the bits of VDSM that use osg::TexGen
User avatar
AnyOldName3
Posts: 2673
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

A theoretically completely working version is available at https://github.com/AnyOldName3/openmw/t ... method-one or https://github.com/AnyOldName3/openmw/t ... method-two and a theoretically everything-except-the-sky-receives-shadows-from-trees version is available at https://github.com/AnyOldName3/openmw/t ... -test-vdsm
User avatar
AnyOldName3
Posts: 2673
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

I just pushed another commit to the sky method two branch as I realised it wouldn't work. If you really keenly decided to use it already, you'll find you need to pull that.
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Shadows

Post by Capostrophic »

Works nice. Shadows very often freak out, minimap and character previews are still darkened, but there's no other noticeable visual issues left. :P
(yep, debug HUD still doesn't work for me I guess. Ubuntu 17.10, method two branch)
User avatar
AnyOldName3
Posts: 2673
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

What do you mean by shadows freak out? The freaking of that I knew about D supposed to be fixed by the changes I pushed today.
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Shadows

Post by Capostrophic »

I meant shadowmap resolution, it noticeably depends upon view angle so if you look straight down or straight up shadows become much more pixelated, and if you rotate the camera to the side the resolution may shift.
User avatar
AnyOldName3
Posts: 2673
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 »

That's expected, and unless you're doing something weird to make it a million times worse than I've seen it, I don't see how anyone who's looked at what any of my shadow experiments before today's change could describe it as freaking out. Eventually I'm probably going to get cascaded shadow maps or parallel split shadow maps working and then it should be less noticeable.
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Shadows

Post by Capostrophic »

Yes, poor choice of words from my side.
Post Reply