Relighting v4.0165b - blurry shadows w/ rlassets
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
-
- Posts: 171
- Joined: Mon Dec 20, 2021 6:16 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Relighting v4.011b
I would like to report a shader issue with floats on deltatouch which I fixed but then a vm abort and have confirmed with generic the same
VM execution aborted: array access out of bounds. Size = 157, current index = 157
Called from hd_light.PostBeginPlay at relighting v4.011b.pk3:zscript/hd_actors.zs, line 236
]
VM execution aborted: array access out of bounds. Size = 157, current index = 157
Called from hd_light.PostBeginPlay at relighting v4.011b.pk3:zscript/hd_actors.zs, line 236
]
- Hey Doomer_
- Posts: 395
- Joined: Tue Oct 18, 2022 1:59 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Relighting v4.011b
Great, thanks for this. What did you fix in the shader?cosmos10040 wrote: ↑Tue Nov 15, 2022 2:38 pm I would like to report a shader issue with floats on deltatouch which I fixed but then a vm abort and have confirmed with generic the same
VM execution aborted: array access out of bounds. Size = 157, current index = 157
Called from hd_light.PostBeginPlay at relighting v4.011b.pk3:zscript/hd_actors.zs, line 236
]
Also what map were you playing when you got the vm abort?
- Hey Doomer_
- Posts: 395
- Joined: Tue Oct 18, 2022 1:59 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Relighting v4.011b
Ah I see it...Hey Doomer_ wrote: ↑Tue Nov 15, 2022 2:55 pmGreat, thanks for this. What did you fix in the shader?cosmos10040 wrote: ↑Tue Nov 15, 2022 2:38 pm I would like to report a shader issue with floats on deltatouch which I fixed but then a vm abort and have confirmed with generic the same
VM execution aborted: array access out of bounds. Size = 157, current index = 157
Called from hd_light.PostBeginPlay at relighting v4.011b.pk3:zscript/hd_actors.zs, line 236
]
Also what map were you playing when you got the vm abort?
Code: Select all
else if (Event.lobj.Find(cname) != Event.lobj.Size())
{
glcolor = Event.cobj[Event.lobj.Find(cname)];
Code: Select all
else if (Event.lobj.Find(cname) != Event.lobj.Size())
{
if (Event.lobj.Find(cname) < Event.cobj.Size()) glcolor = Event.cobj[Event.lobj.Find(cname)];
-
- Posts: 171
- Joined: Mon Dec 20, 2021 6:16 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Relighting v4.011b
All I did was added a decimal (1.0) to hd_shader.fp look below:Hey Doomer_ wrote: ↑Tue Nov 15, 2022 2:55 pmGreat, thanks for this. What did you fix in the shader?cosmos10040 wrote: ↑Tue Nov 15, 2022 2:38 pm I would like to report a shader issue with floats on deltatouch which I fixed but then a vm abort and have confirmed with generic the same
VM execution aborted: array access out of bounds. Size = 157, current index = 157
Called from hd_light.PostBeginPlay at relighting v4.011b.pk3:zscript/hd_actors.zs, line 236
]
Also what map were you playing when you got the vm abort?
c = pow(c, vec3(1.0/rl_gamma));
I was trying to play e1m1
-
- Posts: 171
- Joined: Mon Dec 20, 2021 6:16 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Relighting v4.011b
Currently using subtle lights and darkdoomz. I will try that fixHey Doomer_ wrote: ↑Tue Nov 15, 2022 3:12 pmAh I see it...Hey Doomer_ wrote: ↑Tue Nov 15, 2022 2:55 pmGreat, thanks for this. What did you fix in the shader?cosmos10040 wrote: ↑Tue Nov 15, 2022 2:38 pm I would like to report a shader issue with floats on deltatouch which I fixed but then a vm abort and have confirmed with generic the same
VM execution aborted: array access out of bounds. Size = 157, current index = 157
Called from hd_light.PostBeginPlay at relighting v4.011b.pk3:zscript/hd_actors.zs, line 236
]
Also what map were you playing when you got the vm abort?lobj and cobj should have the same numbers, but depending on gldefs that may not be true (working on that). Here's a quick fix for that:Code: Select all
else if (Event.lobj.Find(cname) != Event.lobj.Size()) { glcolor = Event.cobj[Event.lobj.Find(cname)];
It would help if I knew which lights file or mod you were running... string processing is what it is, but it will help to see how it happened.Code: Select all
else if (Event.lobj.Find(cname) != Event.lobj.Size()) { if (Event.lobj.Find(cname) < Event.cobj.Size()) glcolor = Event.cobj[Event.lobj.Find(cname)];
- Hey Doomer_
- Posts: 395
- Joined: Tue Oct 18, 2022 1:59 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Relighting v4.011b
Awesome thankscosmos10040 wrote: ↑Tue Nov 15, 2022 4:43 pmAll I did was added a decimal (1.0) to hd_shader.fp look below:Hey Doomer_ wrote: ↑Tue Nov 15, 2022 2:55 pmGreat, thanks for this. What did you fix in the shader?cosmos10040 wrote: ↑Tue Nov 15, 2022 2:38 pm I would like to report a shader issue with floats on deltatouch which I fixed but then a vm abort and have confirmed with generic the same
VM execution aborted: array access out of bounds. Size = 157, current index = 157
Called from hd_light.PostBeginPlay at relighting v4.011b.pk3:zscript/hd_actors.zs, line 236
]
Also what map were you playing when you got the vm abort?
c = pow(c, vec3(1.0/rl_gamma));
I was trying to play e1m1
- Hey Doomer_
- Posts: 395
- Joined: Tue Oct 18, 2022 1:59 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Relighting v4.011b
It's not subtle lights. While that has a gldef, there's nothing Relighting would use. I don't see anything in DarkDoomZ either (and didn't see the error), other than it should be loaded before Relighting. Very interesting...cosmos10040 wrote: ↑Tue Nov 15, 2022 4:50 pmCurrently using subtle lights and darkdoomz. I will try that fixHey Doomer_ wrote: ↑Tue Nov 15, 2022 3:12 pmAh I see it...Hey Doomer_ wrote: ↑Tue Nov 15, 2022 2:55 pm
Great, thanks for this. What did you fix in the shader?
Also what map were you playing when you got the vm abort?lobj and cobj should have the same numbers, but depending on gldefs that may not be true (working on that). Here's a quick fix for that:Code: Select all
else if (Event.lobj.Find(cname) != Event.lobj.Size()) { glcolor = Event.cobj[Event.lobj.Find(cname)];
It would help if I knew which lights file or mod you were running... string processing is what it is, but it will help to see how it happened.Code: Select all
else if (Event.lobj.Find(cname) != Event.lobj.Size()) { if (Event.lobj.Find(cname) < Event.cobj.Size()) glcolor = Event.cobj[Event.lobj.Find(cname)];
-
- Posts: 171
- Joined: Mon Dec 20, 2021 6:16 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Relighting v4.011b
So I tried the fix and it works now. Thanks foe the quick fix. Not sure what could have caused it. I did have d64fier and put it back on and thar worked too. I changed the load order and works good.
- Dan_The_Noob
- Posts: 872
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: Relighting v4.011b
it's a shame there's no way to do an entire wad at once for a big load then have the game run after.
unless there was a way to make this an external thing you could dump wads into.
unless there was a way to make this an external thing you could dump wads into.
- Hey Doomer_
- Posts: 395
- Joined: Tue Oct 18, 2022 1:59 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Relighting v4.011b
Agree it would be nice if common elements during a session could be read only once. Still thinking about that.Dan_The_Noob wrote: ↑Tue Nov 15, 2022 5:46 pm it's a shame there's no way to do an entire wad at once for a big load then have the game run after.
unless there was a way to make this an external thing you could dump wads into.
Combinations of possible games and mods make any kind of preloading ahead of time not very useful... Everyone has different likes in add-ons, so they really need to be read on the fly.
I suspect I can improve efficiency using a dictionary structure that reduces string processing, however. Working on that.
Edit
I am seeing that the same lump is loaded many, many times. Not sure why, since this is a simple loop, but that's wasted time for sure.
Edit
The problem is how this searches for lumps. These file handles are thousands apart, and the loop checks each lump in turn until it catches up. This yields expected results:
Code: Select all
while (true)
{
int fhnd = Wads.FindLump("gldefs", startlump, Wads.ANYNAMESPACE);
if (fhnd == -1)
{
break;
}
console.printf("%i %i",fhnd,startlump);
startlump = int(fhnd + 1);
}
Code: Select all
int fhnd = Wads.FindLump("gldefs", startlump++, Wads.ANYNAMESPACE);
if (fhnd == -1) break;
Code: Select all
int fhnd = Wads.FindLump("gldefs", startlump, Wads.ANYNAMESPACE);
if (fhnd == -1) break;
startlump = fhnd + 1;
Maintenance fix pending.
Edit
Load time is a second. Seems that fixes it.
- Hey Doomer_
- Posts: 395
- Joined: Tue Oct 18, 2022 1:59 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Relighting v4.012b
Posted 4.012b, a small but significant maintenance update. This fixes load times.
This also adds several performance tweaks (on the Settings menu) that affect the lifespan of shadows and their visibility. Turning on "Actors Hide Shadows" (true by default) makes a significant difference in fire fights with many monsters. Anything in the background obscured by monsters in front of you can now be skipped. This and increasing the lifespan of the shadows can improve performance although may cause some visual glitches.
Many thanks.
This also adds several performance tweaks (on the Settings menu) that affect the lifespan of shadows and their visibility. Turning on "Actors Hide Shadows" (true by default) makes a significant difference in fire fights with many monsters. Anything in the background obscured by monsters in front of you can now be skipped. This and increasing the lifespan of the shadows can improve performance although may cause some visual glitches.
Many thanks.
- Dan_The_Noob
- Posts: 872
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: Relighting v4.012b
sweet, i'm glad i sparked some inspiration to find that loopHey Doomer_ wrote: ↑Tue Nov 15, 2022 7:10 pm Posted 4.012b, a small but significant maintenance update. This fixes load times.
This also adds several performance tweaks (on the Settings menu) that affect the lifespan of shadows and their visibility. Turning on "Actors Hide Shadows" (true by default) makes a significant difference in fire fights with many monsters. Anything in the background obscured by monsters in front of you can now be skipped. This and increasing the lifespan of the shadows can improve performance although may cause some visual glitches.
Many thanks.
--EDIT--
holy shit, that's near-instant now. night and day haha!
--EDIT--
tried this on a normal sized Obsidian generated map and FPS tanks but loadtime is still near-instant. any idea which settings would cause the most lag after initial load? (~100 enemies)
--UPDATE--
toggling every setting one at a time and resetting between, none of them have any effect on the performance drop.
must be something that runs in the background/consistently. because it's basically a locked 1fps (though turning off quality shadows does improve frametime, as expected.)
- Hey Doomer_
- Posts: 395
- Joined: Tue Oct 18, 2022 1:59 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Relighting v4.012b
Try changing Area Min and Max under Sector Lights or the Min (light min) setting. These affect how many sectors get dynamic light sources that generate the shadows. I changed these to 256/0/240, and this seemed to work for me (upper limit of 0 is unlimited but that can also be changed of course to limit lights). Obsidian doubtless generates too many small, bright sectors. I'll take a look at that!Dan_The_Noob wrote: ↑Tue Nov 15, 2022 7:31 pmsweet, i'm glad i sparked some inspiration to find that loopHey Doomer_ wrote: ↑Tue Nov 15, 2022 7:10 pm Posted 4.012b, a small but significant maintenance update. This fixes load times.
This also adds several performance tweaks (on the Settings menu) that affect the lifespan of shadows and their visibility. Turning on "Actors Hide Shadows" (true by default) makes a significant difference in fire fights with many monsters. Anything in the background obscured by monsters in front of you can now be skipped. This and increasing the lifespan of the shadows can improve performance although may cause some visual glitches.
Many thanks.
--EDIT--
holy shit, that's near-instant now. night and day haha!
--EDIT--
tried this on a normal sized Obsidian generated map and FPS tanks but loadtime is still near-instant. any idea which settings would cause the most lag after initial load? (~100 enemies)
--UPDATE--
toggling every setting one at a time and resetting between, none of them have any effect on the performance drop.
must be something that runs in the background/consistently. because it's basically a locked 1fps (though turning off quality shadows does improve frametime, as expected.)
- Dan_The_Noob
- Posts: 872
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: Relighting v4.012b
OK I see, I'll give that a try.Hey Doomer_ wrote: ↑Wed Nov 16, 2022 2:36 am
Try changing Area Min and Max under Sector Lights or the Min (light min) setting. These affect how many sectors get dynamic light sources that generate the shadows. I changed these to 256/0/240, and this seemed to work for me (upper limit of 0 is unlimited but that can also be changed of course to limit lights). Obsidian doubtless generates too many small, bright sectors. I'll take a look at that!
and yeah it might be worth finding a good default to work in as many maps as possible.
or even set up a presets menu.
--EDIT--
seems to have worked, ill play with the setting to find a good balance.
- Hey Doomer_
- Posts: 395
- Joined: Tue Oct 18, 2022 1:59 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Relighting v4.012b
I'll work on a more intelligent analysis of the map. Currently it sorts by size and changes tactics at the median, but this doesn't account for skew. Thanks again.Dan_The_Noob wrote: ↑Wed Nov 16, 2022 4:05 amOK I see, I'll give that a try.Hey Doomer_ wrote: ↑Wed Nov 16, 2022 2:36 am
Try changing Area Min and Max under Sector Lights or the Min (light min) setting. These affect how many sectors get dynamic light sources that generate the shadows. I changed these to 256/0/240, and this seemed to work for me (upper limit of 0 is unlimited but that can also be changed of course to limit lights). Obsidian doubtless generates too many small, bright sectors. I'll take a look at that!
and yeah it might be worth finding a good default to work in as many maps as possible.
or even set up a presets menu.
--EDIT--
seems to have worked, ill play with the setting to find a good balance.