halflife icon indicating copy to clipboard operation
halflife copied to clipboard

25th Anniversary Update: Overbright not working

Open 54ac opened this issue 2 years ago • 48 comments

The Anniversary Update website states:

Lighting fixes including the long-lost GL Overbright support!

However, toggling gl_overbright does not seem to make any difference, as can be seen in the following screenshots of the first lamp on the left on t0a0:

HalfLife00 HalfLife01

Compare this to the previous build with hw.dll patched to allow for overbright support:

t0a00000 t0a00001

54ac avatar Nov 17 '23 21:11 54ac

Ah I thought I was going crazy, yep gl_overbright 1 currently does nothing for me too, but beware, as even with the patched dll, lighting won't be 1:1 match with Software, environments will be, but not entities that will still look better lit in Software, I'm curious if Valve will be interested in fixing that too. I had screenshots at some point to show the subtle differences but I lost them, I'm sorry...

Deus-nsf avatar Nov 18 '23 10:11 Deus-nsf

According to the screenshot you posted, the only thing they had fixed is the weird chromatic aberration effect was fixed. It still lacks the bloom from the actual overbright mode through.

megakarlach avatar Nov 18 '23 11:11 megakarlach

In OpenGL, gl_overbright is no longer used. The new command is gl_use_shaders (default 1), the overbright fix is implemented on the shader level

ficool2 avatar Nov 18 '23 12:11 ficool2

In OpenGL, gl_overbright is no longer used. The new command is gl_use_shaders (default 1), the overbright fix is implemented on the shader level

Well, it's not working as intended then, because I compared on and off, and while there is indeed a difference, the overbright hack as well as software mode both have much metter lighting still.

Deus-nsf avatar Nov 18 '23 12:11 Deus-nsf

In OpenGL, gl_overbright is no longer used. The new command is gl_use_shaders (default 1), the overbright fix is implemented on the shader level

Disabling gl_use_shaders seems to making it much brighter. gl_use_shaders 0 hl 2023-11-18 20-11-42 gl_use_shaders 1 hl 2023-11-18 20-11-40

gl_use_shaders 0 - Same as gl_overbright 0 hl 2023-11-18 20-19-05

gl_use_shaders 1 - Same as gl_overbright 1, but little bit darker than previous version. hl 2023-11-18 20-19-04

Also with the HLFixes patch: gl_overbright 1 (gl_use_shaders now does nothing after patching with HLFixes) hl 2023-11-18 20-33-33 gl_overbright 0 (gl_use_shaders now does nothing after patching with HLFixes) hl 2023-11-18 20-33-35

megakarlach avatar Nov 18 '23 13:11 megakarlach

In OpenGL, gl_overbright is no longer used. The new command is gl_use_shaders (default 1), the overbright fix is implemented on the shader level

The implementation seems to make the game a lot darker. It also doesn't seem to support multitexturing, at least on that particular wall. See here (gl_use_shaders 0 is brighter):

HalfLife00 HalfLife01

54ac avatar Nov 18 '23 13:11 54ac

Looks like the overbright check is still included in the latest hw.dll. Bypassing it enables gl_overbright like in the previous builds, allowing for more comparisons:

gl_use_shaders 0, gl_overbright 0: HalfLife00

gl_overbright 1: HalfLife02

gl_use_shaders 1: HalfLife03

54ac avatar Nov 18 '23 14:11 54ac

Will doing the hex edit put you at a risk of getting VAC banned on multiplayer though? Heard that at some point, which is why I kind of prefer waiting for an official fix!

Deus-nsf avatar Nov 18 '23 14:11 Deus-nsf

Will doing the hex edit put you at a risk of getting VAC banned on multiplayer though? Heard that at some point, which is why I kind of prefer waiting for an official fix!

I would assume so, just to be safe. But it's useful for comparisons, as seen above.

54ac avatar Nov 18 '23 14:11 54ac

how do you hex edit the new dll though? the sector isn't the same, and the hex string is different too!

Deus-nsf avatar Nov 18 '23 15:11 Deus-nsf

how do you hex edit the new dll though? the sector isn't the same, and the hex string is different too!

It's the same thing still, but at a different location: hl exe_-PID_14572-Module_hw dll-_Thread_15972__2023-11-18_17-02-58

The jump instruction is now at offset 2378047 in hw.dll. I think the latest release of HLFixes linked above supports the latest build and enables gl_overbright without the need for manual hex editing, though in a different way, by forcing gl_texsort.

54ac avatar Nov 18 '23 16:11 54ac

The new update doesn't appear to actually add overbrightness, but merely restores the original look of gl_overbright 0. This is still a step in the right direction, as many lights are no longer clipped at the expense of the artist's intention. One consequence is that modern map compilers expect this quirky behavior and try to compensate for it, so now they will look wrong. Preferably, actual overbrightness would be a thing, for it has rather large aesthetic benefits. gl_overbright

Enokilis avatar Nov 18 '23 21:11 Enokilis

One consequence is that modern map compilers expect this quirky behavior and try to compensate for it, so now they will look wrong.

They'll look different, but not incorrect. When displayed with proper overbrightness, they'll just be slightly brighter, but not by much. The clamping only occurred above a certain brightness threshold (about 160, I think? the lightmaps are 24-bit); anything darker than that was basically the same.

To any map makers reading: add the -limiter 255 argument to your HLRAD compilation step to remove the compensation done by VHLT.

SirYodaJedi avatar Nov 18 '23 22:11 SirYodaJedi

gl_use_shaders 0 vs gl_use_shaders 1 XX

IMHO, gl_use_shaders 1 looks pretty good.

Matthaiks avatar Nov 18 '23 22:11 Matthaiks

Odd. I took this screenshot yesterday, and it definitely doesn't seem as bright. image

Booting it up now, though, it does actually look brighter. Did they hotfix it, or was my config screwed?

Enokilis avatar Nov 18 '23 23:11 Enokilis

Seems like it got hotfixed today.

Looks fine now: HalfLife00 HalfLife01

The wall texture still changes for some reason, but the effect has indeed been fixed.

54ac avatar Nov 19 '23 00:11 54ac

Replying to https://github.com/ValveSoftware/halflife/issues/3424#issuecomment-1817682182

And this is with gl_use_shaders "1"? The gl_overbright command is still defunct?

jakura-nuva avatar Nov 19 '23 00:11 jakura-nuva

And this is with gl_use_shaders "1"? The gl_overbright command is still defunct?

Yes, this is gl_use_shaders 0 and 1 from the latest untouched build, so without the overbright patch. It seems that an update was pushed earlier today which modified hw.dll among other files, so it checks out.

54ac avatar Nov 19 '23 00:11 54ac

They'll look different, but not incorrect.

In comparison to stock maps, that is. They looked "fine" before since the clamping level was consistent across all maps, but now you won't ever get full brightness until you shine a flashlight onto something. I'll definitely be noticing sand textures out in the sun somehow not blooming out when they should.

Enokilis avatar Nov 19 '23 00:11 Enokilis

It seems like overbright/shaders/gl_use_shaders breaks underwater fog:

software renderer (couldn't get the same exact frame captured as the other pictures sorry.): hl1 software renderer underwater webp

gl_use_shaders set to 0: off 70_20231119184332_1 webp

gl_use_shaders set to 1: on 70_20231119184335_1 webp

goodusername123 avatar Nov 20 '23 01:11 goodusername123

Better comparison after November 19 patch:

NOTE: everything below looks almost vanilla or vanilla with HLFixes, just with the PS2 rock textures and that was it, but the result should be the same.

gl_use_shaders 0 with latest update, vanilla:

gl_use_shaders 0 - new update Fog is bright, which makes the black metal gate more visible.

gl_use_shaders 1 with latest update, vanilla:

gl_use_shaders 1 - new update Broken fog, obviously.

gl_use_shaders 1 and gl_overbright 0 with latest update, HLFixes 1.20 Beta 1:

NOTE: HLFixes 1.20 Beta 1 is only compatible with older Nov 17 version, but it works fine with the Nov 19 patch. gl_overbright 0 - gl_use_shaders 1 HLFixes Fogs looks extremely dark, and the brightness was reduced. But this makes the black metal gate less visible as its should be.

gl_use_shaders 0 and gl_overbright 0 with latest update, HLFixes 1.20 Beta 1:

gl_overbright 0 - gl_use_shaders 0 HLFixes Only brightness differences.

gl_use_shaders 0/1 and gl_overbright 1 with latest update, HLFixes 1.20 Beta 1:

gl_overbright 1 - gl_use_shaders 1 HLFixes If gl_overbright 1 is enabled (with HLFixes patch), gl_use_shaders does nothing. Underwater fog is slightly brighter, but not as bright as software mode or with gl_use_shaders 0 on vanilla.

megakarlach avatar Nov 20 '23 09:11 megakarlach

Another comparison with disposal map, its best to use something like this image comparison slider tool to comparing these screenshots.

gl_use_shaders 0 with latest update, vanilla:

gl_use_shaders 0 vanilla

gl_use_shaders 1 with latest update, vanilla:

gl_use_shaders 1 vanilla

gl_use_shaders 1 and gl_overbright 0 with latest update, HLFixes 1.20 Beta 1:

gl_use_shaders 1 HLFix Differences: Appears to be darker than vanilla.

gl_use_shaders 0 and gl_overbright 0 with latest update, HLFixes 1.20 Beta 1:

gl_use_shaders 0 HLFix Looks the same as having it off on vanilla, same brightness.

gl_use_shaders 0/1 and gl_overbright 1 with latest update, HLFixes 1.20 Beta 1:

If gl_overbright 1 is enabled (with HLFixes patch), gl_use_shaders does nothing. gl_overbright 1 Differences: Waste looks much brighter with gl_use_shaders 1 on vanilla than gl_overbright 1 with HLFixes patch.

Conclusion: gl_use_shaders 1 has broken underwater fog, but brighter toxic waste, while gl_overbright 1 did not have any issues whatsoever. For the lamp textures, both seems to look the same.

megakarlach avatar Nov 20 '23 13:11 megakarlach

Underwater rendered with OpenGL looks buggy, look at semitransparent wall on the screenshots, it's not covered with fog. If only they could do the same look as SW renderer does

PaHgoM avatar Nov 22 '23 00:11 PaHgoM

Decided to testing it again with c2a4e.bsp (Questionable Ethics), with HLFixes (latest one, 1.2.0 beta 2, which just come out recently) and vanilla. HLFixes now disable gl_overbright if gl_use_shaders is used instead.

This time I have to make sure the gl_overbright and gl_use_shaders are loading properly by reloading the map to get the actual result, and it's seems to look identical.

Questionable Ethics

gl_use_shaders 1

gl_use_shaders 1

gl_overbright 1

gl_overbright 1

Underwater bug (Surface Tension)

Underwater bug is still present.

gl_overbright 1 - Underwater (HLFixes 1.2.0 B2)

gl_overbright 1 uw

gl_use_shaders 1 - Underwater (HLFixes 1.2.0 B2)

gl_use_shaders 1 - HLFixes

gl_use_shaders 1 - Underwater (Vanilla)

hl 2023-11-22 21-49-16

Brightness/Gamma settings

brightness 1 gamma 2.2

Version

Protocol version 48 Exe version 1.1.2.2 (valve) Exe build: 23:48:06 Nov 20 2023 (9888)

megakarlach avatar Nov 22 '23 14:11 megakarlach

November 22, 2023 Update

Fixed underwater fog rendering in OpenGL.

c2a50000

Matthaiks avatar Nov 22 '23 18:11 Matthaiks

Not bad, I wonder if the tranparent textures can be included in the fog pass.

Deus-nsf avatar Nov 22 '23 18:11 Deus-nsf

well, this most recent update seemed to have fixed the water-fog with overbright enabled, but it broke being able to enable Detailed Textures with overbright.

Detailed Textures and Overbright combined wasn't possible until the Anniversary update, but now it isn't working.

If it's possible try to get all 3 working Overbright/DT/FOG simultaneously and it will be the best it has ever been.

Also, I think depending on the game, if Shaders are enabled by default now, it's going to break DT with no ingame option to disable the overbright/shader. DOD/CSZ both can use DT among with mods.

Maharic avatar Nov 22 '23 19:11 Maharic

Detailed Textures and Overbright combined wasn't possible until the Anniversary update, but now it isn't working.

Are you sure detail textures worked together with shaders before? I was under the impression it was one or the other, like overbright pre-Anniversary, but I haven't tested this out much. There is an unused detail textures entry in the new video options menu, hopefully we won't have to deal with a limitation from decades ago for much longer.

54ac avatar Nov 22 '23 19:11 54ac

November 22, 2023 Update

Fixed underwater fog rendering in OpenGL.

Definitely better than before, although HLFixes is still viable since it preserves the correct appearance of that black gate (and presumably similar geometry/textures). It would be nice if they could tweak the effect further.

jakura-nuva avatar Nov 22 '23 19:11 jakura-nuva

Detailed Textures and Overbright combined wasn't possible until the Anniversary update, but now it isn't working.

Are you sure detail textures worked together with shaders before? I was under the impression it was one or the other, like overbright pre-Anniversary, but I haven't tested this out much. There is an unused detail textures entry in the new video options menu, hopefully we won't have to deal with a limitation from decades ago for much longer.

20231122144511_1 20231122004506_1

(The bottom picture is before the update with both Overbright and Detailed Texture enabled. Now if you enable the shader, it forces the DT off.)

Yeah, it works.

I was actually in the middle of creating some new subtle Detailed Textures too haha. Just because I was happy I could combined which wasn't possible before.

Also, a lot of upcoming mods use a lot of DT now, even if subtle, which all looks even better combined with Overbright.

Maharic avatar Nov 22 '23 19:11 Maharic