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.
- Dan_The_Noob
- Posts: 880
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: Relighting v4.0146b
now we just need to figure a solution for the subtract shader enemies glowing white and all will be good in the relit world of doom
- Hey Doomer_
- Posts: 455
- 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.0145b - slightly more accurate lights
Update
I've looked at this again and for the next release I've added a subtle pulsating fog effect for orthogonal sectors that are aligned to grid e.g. a texture. This either adds a slight haze for brighter ceiling lights or a darker shade for reds, greens, etc. No performance impact. Still testing. Thanks for reminding me about the spotlights.
- Hey Doomer_
- Posts: 455
- 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.0146b
Sorry - what mod is that with again? If it's a shader issue I'm not sure there's much that can be done, but I can take a look at that again.Dan_The_Noob wrote: ↑Mon Dec 12, 2022 8:58 pm now we just need to figure a solution for the subtract shader enemies glowing white and all will be good in the relit world of doom
It's possible for ZScript to read shader lumps and see what they are doing, I suppose...

- Dan_The_Noob
- Posts: 880
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: Relighting v4.0146b
it's with any mod that uses subtract ("Nightmare Demon" "Nightmare Imp" etc)
the black/blue-ish shader
i have some in Intensify but the PSX Doom mods also use it.
https://doomwiki.org/wiki/File:NightmareSpectre.png
the black/blue-ish shader
i have some in Intensify but the PSX Doom mods also use it.
https://doomwiki.org/wiki/File:NightmareSpectre.png
- Hey Doomer_
- Posts: 455
- 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.0146b
I see what you're talking about. It isn't the color bleeding. Curious, does this happen with other shaders?Dan_The_Noob wrote: ↑Tue Dec 13, 2022 1:26 pm it's with any mod that uses subtract ("Nightmare Demon" "Nightmare Imp" etc)
the black/blue-ish shader
i have some in Intensify but the PSX Doom mods also use it.
https://doomwiki.org/wiki/File:NightmareSpectre.png
- Dan_The_Noob
- Posts: 880
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: Relighting v4.0146b
I'm not sure about other shaders, but subtract seems to be the only one i've noticed.Hey Doomer_ wrote: ↑Tue Dec 13, 2022 4:49 pm I see what you're talking about. It isn't the color bleeding. Curious, does this happen with other shaders?
i find it odd that it does it but transparent doesn't.
- Hey Doomer_
- Posts: 455
- 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.0146b
Found it. The problem is gamma correction in the shader. I have a fix for the next release. Good catch, since this breaks anything with the STYLE_Subtract render style.Dan_The_Noob wrote: ↑Tue Dec 13, 2022 7:55 pmI'm not sure about other shaders, but subtract seems to be the only one i've noticed.Hey Doomer_ wrote: ↑Tue Dec 13, 2022 4:49 pm I see what you're talking about. It isn't the color bleeding. Curious, does this happen with other shaders?
i find it odd that it does it but transparent doesn't.

- Hey Doomer_
- Posts: 455
- 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.0147b - fog / STYLE_Subtract hotfix
Posted v4.0147b
This is a hotfix release for the STYLE_Subtract shader bug. It turns off gamma correction if anything is spawned with a STYLE_Subtract render style. Also added a subtle pulsating fog effect that for now varies slightly depending on the perceived brightness of the ceiling or floor flat. For the present I think this is very close to feature complete as a universal mod. I appreciate all the input and enthusiasm. That's a huge help. I'm sure there are still bugs and things to improve, but this is getting much closer to my original vision for this mod.
Two things:
Edit
Investigating... wonder if this is worth it?
This is a hotfix release for the STYLE_Subtract shader bug. It turns off gamma correction if anything is spawned with a STYLE_Subtract render style. Also added a subtle pulsating fog effect that for now varies slightly depending on the perceived brightness of the ceiling or floor flat. For the present I think this is very close to feature complete as a universal mod. I appreciate all the input and enthusiasm. That's a huge help. I'm sure there are still bugs and things to improve, but this is getting much closer to my original vision for this mod.
Two things:
- Demo video - no idea the best way to do this, but cool to show off what the mod does. AFAIK Relighting is unique. I'd appreciate input on this.
- Materials - while ZScript can't create normal maps etc. ad hoc, an external utility can. It's feasible to write something that creates material assets for all textures and flats (too bad that doesn't include sprites, an inexplicable GZDoom limitation).
Edit
Investigating... wonder if this is worth it?

Last edited by Hey Doomer_ on Thu Dec 15, 2022 2:29 am, edited 1 time in total.
- mamaluigisbagel
- Posts: 527
- Joined: Wed Jul 09, 2014 7:25 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: Relighting v4.0147b - fog / STYLE_Subtract hotfix
Apologies if this was mentioned or answered already, but I've noticed my HUD gets affected by relighting now. It may be hard to see in this screenshot, but the HUD is just brighter. (its more noticeable when looking at the numbers on the ammo section, instead of yellow they're more of a white color) Any idea why this happens?


- Hey Doomer_
- Posts: 455
- 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.0147b - fog / STYLE_Subtract hotfix
This is probably the color bleeding. This can be turned off in Settings I think.mamaluigisbagel wrote: ↑Wed Dec 14, 2022 8:01 am Apologies if this was mentioned or answered already, but I've noticed my HUD gets affected by relighting now. It may be hard to see in this screenshot, but the HUD is just brighter. (its more noticeable when looking at the numbers on the ammo section, instead of yellow they're more of a white color) Any idea why this happens?
-
- Posts: 204
- Joined: Mon Dec 20, 2021 6:16 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Relighting v4.0147b - fog / STYLE_Subtract hotfix
On v4.0147b, dtouch, I get an abort. Could be a integer somewhere.
**** DIED WITH FATAL ERROR:
Compile Shader 'hd_shader.fp':
ERROR: 0:24: '!=' : wrong operand types no operation '!=' exists that takes a left-hand operand of type 'unknown qualifier float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 1 compilation errors. No code generated.
**** DIED WITH FATAL ERROR:
Compile Shader 'hd_shader.fp':
ERROR: 0:24: '!=' : wrong operand types no operation '!=' exists that takes a left-hand operand of type 'unknown qualifier float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 1 compilation errors. No code generated.
- Hey Doomer_
- Posts: 455
- 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.0147b - fog / STYLE_Subtract hotfix
Interesting. Here's the code:cosmos10040 wrote: ↑Wed Dec 14, 2022 9:00 am On v4.0147b, dtouch, I get an abort. Could be a integer somewhere.
**** DIED WITH FATAL ERROR:
Compile Shader 'hd_shader.fp':
ERROR: 0:24: '!=' : wrong operand types no operation '!=' exists that takes a left-hand operand of type 'unknown qualifier float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 1 compilation errors. No code generated.
Code: Select all
if (rl_gamma != 0) c = pow(c, vec3(1.0/rl_gamma));
-
- Posts: 204
- Joined: Mon Dec 20, 2021 6:16 am
- Graphics Processor: ATI/AMD (Modern GZDoom)
Re: Relighting v4.0147b - fog / STYLE_Subtract hotfix
Yup it works!Hey Doomer_ wrote: ↑Wed Dec 14, 2022 4:04 pmInteresting. Here's the code:cosmos10040 wrote: ↑Wed Dec 14, 2022 9:00 am On v4.0147b, dtouch, I get an abort. Could be a integer somewhere.
**** DIED WITH FATAL ERROR:
Compile Shader 'hd_shader.fp':
ERROR: 0:24: '!=' : wrong operand types no operation '!=' exists that takes a left-hand operand of type 'unknown qualifier float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 1 compilation errors. No code generated.Try changing the 0 to 0.0...Code: Select all
if (rl_gamma != 0) c = pow(c, vec3(1.0/rl_gamma));
- Dan_The_Noob
- Posts: 880
- Joined: Tue May 07, 2019 12:24 pm
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: Relighting v4.0147b - fog / STYLE_Subtract hotfix
maybe just record a couple of clips with a couple different mods being used and fire some projectiles down hallways etc. similar to the preview gifs n stuffHey Doomer_ wrote: ↑Wed Dec 14, 2022 4:07 am
[*] Demo video - no idea the best way to do this, but cool to show off what the mod does. AFAIK Relighting is unique. I'd appreciate input on this.
- mamaluigisbagel
- Posts: 527
- Joined: Wed Jul 09, 2014 7:25 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: Relighting v4.0147b - fog / STYLE_Subtract hotfix
Found what was causing it. Turning off the "Shader" option fixes the problem with the the HUD changing colors.