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.
Shadows
- AnyOldName3
- Posts: 2673
- Joined: 26 Nov 2015, 03:25
Re: Shadows
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.
- AnyOldName3
- Posts: 2673
- Joined: 26 Nov 2015, 03:25
Re: Shadows
I'm guessing it was all covered up by the bits of VDSM that use osg::TexGen
- AnyOldName3
- Posts: 2673
- Joined: 26 Nov 2015, 03:25
Re: Shadows
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
- AnyOldName3
- Posts: 2673
- Joined: 26 Nov 2015, 03:25
Re: Shadows
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.
- Capostrophic
- Posts: 794
- Joined: 22 Feb 2016, 20:32
Re: Shadows
Works nice. Shadows very often freak out, minimap and character previews are still darkened, but there's no other noticeable visual issues left.
(yep, debug HUD still doesn't work for me I guess. Ubuntu 17.10, method two branch)
(yep, debug HUD still doesn't work for me I guess. Ubuntu 17.10, method two branch)
- AnyOldName3
- Posts: 2673
- Joined: 26 Nov 2015, 03:25
Re: Shadows
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.
- Capostrophic
- Posts: 794
- Joined: 22 Feb 2016, 20:32
Re: Shadows
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.
- AnyOldName3
- Posts: 2673
- Joined: 26 Nov 2015, 03:25
Re: Shadows
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.
- Capostrophic
- Posts: 794
- Joined: 22 Feb 2016, 20:32
Re: Shadows
Yes, poor choice of words from my side.