Allow shader names with underscores

This commit is contained in:
Kovid Goyal
2025-08-13 07:10:16 +05:30
parent c01df574a2
commit d7ab6ad314
4 changed files with 3 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
uniform vec4 src_rect, dest_rect;
#pragma kitty_include_shader <blit_common_vertex.glsl>
#pragma kitty_include_shader <blit_common.glsl>

View File

@@ -1,2 +1,2 @@
uniform vec4 src_rect, dest_rect;
#pragma kitty_include_shader <blit_common_vertex.glsl>
#pragma kitty_include_shader <blit_common.glsl>

View File

@@ -1151,7 +1151,7 @@ def build_uniforms_header(skip_generation: bool = False) -> str:
for x in sorted(glob.glob('kitty/*.glsl')):
name = os.path.basename(x).partition('.')[0]
name, sep, shader_type = name.partition('_')
name, sep, shader_type = name.rpartition('_')
if not sep or shader_type not in ('fragment', 'vertex'):
continue
class_names[name] = f'{name.capitalize()}Uniforms'