Skip to content

Commit c8af79f

Browse files
committed
Fix missing fallback for shader precaching
1 parent d4ebcf0 commit c8af79f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

code/def_files/data/effects/shadow_map-v.sdr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#extension GL_ARB_gpu_shader5: enable
33

44
#ifndef GEOMETRY_FALLBACK
5-
#extension GL_ARB_shader_viewport_layer_array : require
5+
#extension GL_ARB_shader_viewport_layer_array : enable
66
#endif
77

88
in vec4 vertPosition;

code/model/modelread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3208,7 +3208,7 @@ void model_load_texture(polymodel *pm, int i, const char *file)
32083208

32093209
// See if we need to compile a new shader for this material
32103210
if (Shadow_quality != ShadowQuality::Disabled)
3211-
gr_maybe_create_shader(SDR_TYPE_SHADOW_MAP_GEN, 0);
3211+
gr_maybe_create_shader(SDR_TYPE_SHADOW_MAP_GEN, gr_is_capable(gr_capability::CAPABILITY_FAST_SHADOWS) ? 0 : SDR_FLAG_SHADOW_FALLBACK);
32123212

32133213
gr_maybe_create_shader(SDR_TYPE_MODEL, 0);
32143214

0 commit comments

Comments
 (0)