Shadows

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

Re: Shadows

Post by scrawl » 05 Nov 2017, 11:30

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: 545
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 05 Nov 2017, 15:24

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: 545
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 05 Nov 2017, 15:33

I'm guessing it was all covered up by the bits of VDSM that use osg::TexGen

User avatar
AnyOldName3
Posts: 545
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 05 Nov 2017, 15:41

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: 545
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 05 Nov 2017, 15:47

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: 256
Joined: 22 Feb 2016, 20:32

Re: Shadows

Post by Capostrophic » 05 Nov 2017, 17:11

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)
shitty lingua anglica grammar ftw

User avatar
AnyOldName3
Posts: 545
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 05 Nov 2017, 19:20

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: 256
Joined: 22 Feb 2016, 20:32

Re: Shadows

Post by Capostrophic » 05 Nov 2017, 19:27

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.
shitty lingua anglica grammar ftw

User avatar
AnyOldName3
Posts: 545
Joined: 26 Nov 2015, 03:25

Re: Shadows

Post by AnyOldName3 » 05 Nov 2017, 21:51

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: 256
Joined: 22 Feb 2016, 20:32

Re: Shadows

Post by Capostrophic » 05 Nov 2017, 22:07

Yes, poor choice of words from my side.
shitty lingua anglica grammar ftw

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests