yquake2 / yquake2

The Yamagi Quake II client
https://www.yamagi.org/quake2/
Other
851 stars 216 forks source link

Feature Suggestion: Options submenu for scaling graphical elements #619

Open hfc2x opened 4 years ago

hfc2x commented 4 years ago

Hello there.

I wanted to know if it's possible to add a separate Video Options submenu that controls CVars such as gl3_particle_size, since the default values at high resolutions cause certain visual elements to be disproportionately small. Such CVars can already be changed by the player via the console, but it's necessary to read the documentation first. Having a slider for this particular one would be very helpful.

A somewhat related idea is maybe adding a submenu for all the gl3_ CVars that can only be accessed if the current renderer is OpenGL 3.2, and something similar for other prefixed CVars with their corresponding renderer option.

lazd commented 3 years ago

@hfc2x I can take this issue on. For each renderer, can you please provide a table with the cvar names, their min and max values, and the human readable slider label? Like this (min/max are probably wrong, but you get the point):

Software

??

GL1

??

GL3

label cvar min max
particle size gl3_particle_size 0 100
lazd commented 3 years ago

@Yamagi I imagine we'll need to display a different set of sliders based on the selected renderer, I assume this is simple enough to do with a switch on vid_renderer. Any special cases I should be aware of?

Yamagi commented 3 years ago

Most scaling cvars are render independent and already by the //ui scale// option in the video menu. These are:

The value is the scaling factor. 1 means no scaling, -1 calculates the scaling factor based upon the resolution. Since the scaling is done on a per pixel base only full integers should be given, otherwise the result will be blurry and fonts hard to read.

The only other cvar I can think of is the particle scaling factor:

The min value should be 10, everything else is too small. And the maximum value should be 80, otherwise it gets too big. But is it really worth the effort for one cvar? Maybe the other way round is better, make the particle size resolution independent in all renderers.

The renderer selection can be based upon vid_renderer. I'll likely merge the Vulkan renderer before christmas, so supporting the vk case is a good idea. And at least in theory we're supporting 3rd party renderers. So the case of an unknown renderer must be handled.

lazd commented 3 years ago

I agree that that particle size should should be resolution independent (automatically adjusted) in all renderers. Given there is only 1 cvar, I don't think it makes sense to add a submenu. Additionally, given that negative numbers are relevant, using a slider would not communicate that the option has been set to "automatic," so additional UI would have to be provided for options that support "automatic."

However, if there are other common video options that we could add, I'm open to implementing UI for them, just let me know what makes sense.