Bicubic filtering param

update-vulkan-gen
FlightlessMango 1 year ago
parent de29e057de
commit 4fb0bb328b

@ -380,6 +380,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `wine` | Shows current Wine or Proton version in use |
| `picmip` | Mip-map LoD bias. Negative values will increase texture sharpness (and aliasing). Positive values will increase texture blurriness (-16 to 16) |
| `af` | Anisotropic filtering level. Improves sharpness of textures viewed at an angle (0 to 16) |
| `bicubic` | Force bicubic filtering |
| `trilinear` | Force trilinear filtering |
Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32`

@ -553,6 +553,7 @@ parse_overlay_env(struct overlay_params *params,
params->enabled[OVERLAY_PARAM_ENABLED_hud_compact] = 0;
params->enabled[OVERLAY_PARAM_ENABLED_exec_name] = 0;
params->enabled[OVERLAY_PARAM_ENABLED_trilinear] = 0;
params->enabled[OVERLAY_PARAM_ENABLED_bicubic] = 0;
}
#define OVERLAY_PARAM_BOOL(name) \
if (!strcmp(#name, key)) { \
@ -709,6 +710,7 @@ parse_overlay_config(struct overlay_params *params,
params->enabled[OVERLAY_PARAM_ENABLED_hud_compact] = 0;
params->enabled[OVERLAY_PARAM_ENABLED_exec_name] = 0;
params->enabled[OVERLAY_PARAM_ENABLED_trilinear] = 0;
params->enabled[OVERLAY_PARAM_ENABLED_bicubic] = 0;
params->options.erase("full");
}
for (auto& it : params->options) {

@ -92,6 +92,7 @@ typedef unsigned long KeySym;
OVERLAY_PARAM_BOOL(battery_time) \
OVERLAY_PARAM_BOOL(exec_name) \
OVERLAY_PARAM_BOOL(trilinear) \
OVERLAY_PARAM_BOOL(bicubic) \
OVERLAY_PARAM_CUSTOM(fps_sampling_period) \
OVERLAY_PARAM_CUSTOM(output_folder) \
OVERLAY_PARAM_CUSTOM(output_file) \

@ -1954,6 +1954,12 @@ static VkResult overlay_CreateSampler(
sampler.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
}
if (params->enabled[OVERLAY_PARAM_ENABLED_bicubic]){
sampler.magFilter = VK_FILTER_CUBIC_IMG;
sampler.minFilter = VK_FILTER_CUBIC_IMG;
sampler.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
}
struct device_data *device_data = FIND(struct device_data, device);
VkResult result = device_data->vtable.CreateSampler(device, &sampler, pAllocator, pSampler);

Loading…
Cancel
Save