Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outline tweaks and spectator xray #800

Merged
merged 26 commits into from
Sep 13, 2023
Merged

Outline tweaks and spectator xray #800

merged 26 commits into from
Sep 13, 2023

Conversation

krizej
Copy link
Contributor

@krizej krizej commented Aug 5, 2023

changes:

  • r_fx_geometry has been merged with gl_outline
  • added cvars:
    • gl_outline_color_world - sets the color of the world outline
    • gl_outline_color_model - sets the color of the model outline
    • gl_outline_color_team - sets the color of friendly players' outlines
    • gl_outline_color_enemy - sets the color of enemy players' outlines
    • gl_outline_scale_model - adjusts the scale of the model outline (smackdown/qcon have 0-1 limit, 0-5 on others)
    • gl_outline_depth_threshold - adjusts the threshold for drawing world outlines using depth values
    • gl_outline_use_player_color - uses the top and bottom colors of players as outline colors
    • gl_spec_xray - demo/qtv-only, see players through walls (uses the gl_outline shader and is affected by outline color and scale values) (REQ: Spec feature - See through walls #711)
    • gl_spec_xray_distance - sets the distance from which you can see players through walls
  • fixed BUG: r_fx_geometry doesn't take viewsize into account #598 (and the duplicate, BUG: r_fx_geometry incorrect behavior in smaller viewsize's #792)
  • tweaked outlining of turb surfaces (shown below)
    image

src/glsl/common.glsl Outdated Show resolved Hide resolved
@krizej krizej changed the title Outline tweaks Outline tweaks and spectator xray Aug 8, 2023
@tcsabina
Copy link
Collaborator

tcsabina commented Aug 8, 2023

Hi @krizej,

Could you define 'r_fx_geometry has been rewritten from scratch and merged with gl_outline' a bit more detailed?
Thanks!

@krizej
Copy link
Contributor Author

krizej commented Aug 8, 2023

the entire geometry shader has been rewritten (erased and written in a different, hopefully better way)
r_fx_geometry cvar has been removed and gl_outline is now controlling whether the shader is active
gl_outline 2 is equivalent to r_fx_geometry 1
gl_outline 3 is equivalent to r_fx_geometry 1; gl_outline 1
gl_outline 1 is unchanged (besides the new additions affecting its behaviour)

i have got one more thing left to do, which is to remove the old gl_outline 2 which is locked behind the default ruleset and sv_cheats 1

@ciscon
Copy link
Collaborator

ciscon commented Aug 8, 2023

So a few things, my only tests have been playing demos, during which I see the old world geometry pop up randomly
ezquake022
Also it doesn't appear that gl_outline_color_enemy is doing anything, it's just taking the color from gl_outline_color_models.
One concern I think will probably be raised at some point is that you can set the outline width pretty large making the character a bit more visible, we may be want to drop the max on that a bit
ezquake023

@krizej
Copy link
Contributor Author

krizej commented Aug 8, 2023

will check those things out tommorow, thanks for testing

@suddendeathTV
Copy link

suddendeathTV commented Aug 9, 2023

Hey, few things:

  1. Does this eliminate the ability to allow one form and disallow another? E.g. in the past we could allow outlines of world in a ruleset while disallowing outlines of players in that same ruleset. By merging the two, is that no longer possible? This will make this commit more difficult to accept for many. Unless obviously smackdown/qcon can disallow gl_outline 3 but allow gl_outline 2. Thicker outlines on player models is a can of worms as Ciscon already mentioned. There were less strict - and still used - rulesets in the past like Thunderdome where both probably would be allowed, but without very strict limits on all these cvars, I don't see them getting accepted in smackdown/qcon.
  2. gl_spec_xray is amazing but should probably be limited to QTV/MVD rather than spectator. (How does this work in conjunction with PVS? Maybe PVS doesn't apply to spectators and I'm just dumb)

Great work though!

@krizej
Copy link
Contributor Author

krizej commented Aug 9, 2023

hi, ruleset rules are applied on individual modes (gl_outline 1 and gl_outline 2), if the player has gl_outline 3 it acts like 1+2 (if you get what i mean?) - the code doesnt care if its 3, only if it has 1 (or 2) in it
gl_outline 1 = r_fx_geometry 0; gl_outline 1,
gl_outline 2 = r_fx_geometry 1; gl_outline 0 and
gl_outline 3 = r_fx_geometry 1; gl_outline 1

the scale was already changed, i limited it to ranges 0-1 in smackdown and qcon (where model outlines are disabled anyway), and other rulesets have the 0-5 limit (altough maybe i should change it to 0-2 or something, except for ruleset default).

as for gl_spec_xray, sure, i too thought that should be the case. i'll drop a commit that limits it to qtv soon.

thanks!

@suddendeathTV
Copy link

Thanks for the clarification!

Great contributions, I reckon it'll get accepted very soon :-)

@ciscon
Copy link
Collaborator

ciscon commented Aug 18, 2023

with the default gl_outline_world_depth_threshold of 0.3 it looks like this:
ezquake030

@tcsabina tcsabina merged commit 4dd9ac9 into QW-Group:master Sep 13, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: r_fx_geometry doesn't take viewsize into account
5 participants