vk: rt: allow hiding all SURF_DRAWSKY surfaces while retaining skybox
Neede for getting rid of some skybox 𝘱𝘦𝘯𝘦𝘵𝘳𝘢𝘵𝘪𝘰𝘯 glitches, see #579
This commit is contained in:
parent
3cbc11a8f0
commit
6fc318143e
|
@ -1,4 +1,4 @@
|
|||
# 2023-12-14 E346
|
||||
# 2023-12-14 E346-E347
|
||||
- [x] Optimize skybox loading, #706
|
||||
- [x] Do not load skybox when there are no SURF_DRAWSKY, #579
|
||||
- [x] Do not reload the same skybox
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"_xvk_ent_id" "246" // DANGER sign
|
||||
"origin" "1 0 0"
|
||||
}
|
||||
{
|
||||
"_xvk_smoothing_threshold" "54" // FIXME
|
||||
}
|
||||
{
|
||||
"_xvk_ent_id" "246" // DANGER sign
|
||||
"origin" "1 0 0"
|
||||
}
|
||||
{
|
||||
"_xvk_smoothing_threshold" "54" // FIXME
|
||||
"_xvk_remove_all_sky_surfaces" "1"
|
||||
}
|
||||
|
|
|
@ -995,6 +995,10 @@ static model_sizes_t computeSizes( const model_t *mod, qboolean is_worldmodel )
|
|||
break;
|
||||
case BrushSurface_Sky:
|
||||
sizes.sky_surfaces_count++;
|
||||
|
||||
// Do not count towards surfaces that we'll load (still need to count if for the purpose of loading skybox)
|
||||
if (g_map_entities.remove_all_sky_surfaces)
|
||||
continue;
|
||||
break;
|
||||
case BrushSurface_Regular:
|
||||
break;
|
||||
|
@ -1321,8 +1325,10 @@ static qboolean fillBrushSurfaces(fill_geometries_args_t args) {
|
|||
break;
|
||||
case BrushSurface_Conveyor:
|
||||
break;
|
||||
case BrushSurface_Regular:
|
||||
case BrushSurface_Sky:
|
||||
if (g_map_entities.remove_all_sky_surfaces)
|
||||
continue;
|
||||
case BrushSurface_Regular:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -733,6 +733,11 @@ static void parseEntities( char *string, qboolean is_patch ) {
|
|||
if (have_fields & Field__xvk_smoothing_group) {
|
||||
addSmoothingGroup(&values);
|
||||
}
|
||||
|
||||
if (have_fields & Field__xvk_remove_all_sky_surfaces) {
|
||||
DEBUG("_xvk_remove_all_sky_surfaces=%d", values._xvk_remove_all_sky_surfaces);
|
||||
g_map_entities.remove_all_sky_surfaces = values._xvk_remove_all_sky_surfaces;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
X(25, int, _xvk_smooth_entire_model, Int) \
|
||||
X(26, int_array_t, _xvk_smoothing_excluded, IntArray) \
|
||||
X(27, float, _xvk_tex_rotate, Float) \
|
||||
X(28, int, _xvk_remove_all_sky_surfaces, Int) \
|
||||
|
||||
/* NOTE: not used
|
||||
X(23, int, renderamt, Int) \
|
||||
|
@ -175,6 +176,8 @@ typedef struct {
|
|||
int excluded_count;
|
||||
int excluded[MAX_EXCLUDED_SMOOTHING_SURFACES];
|
||||
} smoothing;
|
||||
|
||||
qboolean remove_all_sky_surfaces;
|
||||
} xvk_map_entities_t;
|
||||
|
||||
// TODO expose a bunch of things here as funtions, not as internal structures
|
||||
|
|
Loading…
Reference in New Issue