halflife icon indicating copy to clipboard operation
halflife copied to clipboard

gl_overbright & OpenGL

Open BUXPb opened this issue 13 years ago • 16 comments

1

2

gl_overbright only works in the Software and D3D, but only the latter was playable. Now, when he was removed from the Half-Life, there are no way to return gl_overbright through OpenGL c its new features? All the same, this mode is more pleasant to the eye. Thanks in advance.

BUXPb avatar Feb 16 '13 18:02 BUXPb

Do you wear sunglasses when playing, gl_overbright burns my eyes ;-)

alfred-valve avatar Feb 16 '13 20:02 alfred-valve

@alfred-valve completely agree, adjust gamma,brightness, or even change it on your monitor

hotactions avatar Feb 16 '13 23:02 hotactions

Might as well disable bloom and HDR functionality from Source with that logic.

JPolito avatar Feb 17 '13 00:02 JPolito

Looking at the code in the guts of the GL renderer there are comments about overbright not being supported, so I am not going to re-engineer things to make it work.

alfred-valve avatar Mar 29 '13 00:03 alfred-valve

@mikela-valve What do the comments say exactly? I was able to get overbright to work (albeit using GLSL shaders) so perhaps things have changed since Alfred last looked into this.

Here are some screenshots showing the difference (off/on): https://i.imgur.com/XJfTNqu.png https://i.imgur.com/vwHxwvw.png

https://i.imgur.com/hNtoi4P.png https://i.imgur.com/L6UOgQn.png

https://i.imgur.com/z0mlbmv.png https://i.imgur.com/bDu21DC.png

https://i.imgur.com/DqOZPIe.png https://i.imgur.com/rJVP19D.png

https://i.imgur.com/zFjbig0.png https://i.imgur.com/PxcRaLq.png

See also #1891

SamVanheer avatar Apr 20 '19 08:04 SamVanheer

@mikela-valve @kisak-valve can this issue be reopened to track gl_overbright support?

SamVanheer avatar Apr 21 '19 08:04 SamVanheer

Apologies for opening a new issue, I couldn't find this one.

Overbright and detail textures can't be used together, and it would be very nice if they could be. If anything can be done to let them co-exist, that would open some doors.

MFKitten avatar Apr 21 '19 08:04 MFKitten

I patched the latest public build of the engine to ignore the gl_texsort check in R_BuildLightMap.

I don't see any problems with both detail textures and overbright being enabled at the same time. It works just like you'd expect, no glitches or anything.

If you need to test this out, here are keybinds i made to make this easy:

alias toggle_details_off "r_detailtextures 0; say DETAIL TEXTURES OFF; alias toggle_details toggle_details_on"
alias toggle_details_on "r_detailtextures 1; say DETAIL TEXTURES ON; alias toggle_details toggle_details_off"
alias toggle_details toggle_details_off
bind c toggle_details

alias toggle_overbright_off "gl_overbright 0; say OVERBRIGHT OFF; alias toggle_overbright toggle_overbright_on"
alias toggle_overbright_on "gl_overbright 1; say OVERBRIGHT ON; alias toggle_overbright toggle_overbright_off"
alias toggle_overbright toggle_overbright_off
bind v toggle_overbright

Overbright changes take effect when the lightmap is changed, so turn on the flashlight and shine it to see the changes, or reload the map. It's easy to see changes by turning on the flashlight, then toggling the features to see the difference. Condition Zero has a lot of maps that can be tested this way.

SamVanheer avatar Apr 21 '19 09:04 SamVanheer

@SamVanheer that's fantastic news, and I haven't seen anyone reference this fact anywhere online yet. Is this literally in the game already, or do I need to enable this fix somehow?

MFKitten avatar Apr 21 '19 09:04 MFKitten

I patched the hw dll but it's not something that can be released. I basically replaced the jz instruction with 2 no-op instructions.

SamVanheer avatar Apr 21 '19 10:04 SamVanheer

@mikela-valve this seems to be an "easy" fix, and it's easily as important as the non-PO2 texture rescaling fix.

MFKitten avatar Apr 21 '19 10:04 MFKitten

I'll reserve judgment until after we know what the comments say.

SamVanheer avatar Apr 21 '19 10:04 SamVanheer

@SamVanheer going back and reading above, "not supported" is an interesting statement indeed. Non-po2 textures weren't supported either though really.

MFKitten avatar Apr 21 '19 10:04 MFKitten

Hello @SamVanheer, checking over this, Alfred made a fairly clear decision with this issue report back in 2013, and #1891 is open as a newer iteration of this request.

Friendly reminder that I'm a moderator for Valve's issue trackers on Github and not a Valve dev working on these games. If @mikela-valve wants to use this issue report instead of #1891, we can close that one in favor of re-opening this one, but beyond that I'm not inclined to re-open this issue report without an preference from a dev.

kisak-valve avatar Apr 22 '19 14:04 kisak-valve

@kisak-valve is it possible to simply allow Sam's modification to go unchecked by VAC somehow, so modders can do it without getting VAC banned? That way nobody at Valve has to re-engineer or otherwise alter the engine, but the changes can be done without risk from the players.

MFKitten avatar Apr 22 '19 16:04 MFKitten

@kisak-valve Thanks for the reply.

@MFKitten I essentially hex edited the engine binary, that's not a solution. Mike still needs to look into it to see if it works properly and he can allow overbright to function easily by changing the code. My changes are useful only for local testing purposes.

SamVanheer avatar Apr 22 '19 16:04 SamVanheer