mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-07-08 00:34:52 +00:00
Handle array uniforms when fixing GLSL
This commit is contained in:
parent
ddc012394e
commit
b656fc4ec5
1 changed files with 1 additions and 0 deletions
|
|
@ -383,6 +383,7 @@ def fixup_opengl_code(glsl_code: str) -> tuple[str, dict[str, str]]:
|
|||
ans = '\n'.join(lines)
|
||||
for block_name, names in uniform_blocks.items():
|
||||
for u in names:
|
||||
u = u.partition('[')[0]
|
||||
ans = ans.replace(f'{block_name}.{u}', u)
|
||||
ans = ans.replace('gl_VertexIndex', 'gl_VertexID')
|
||||
ans = ans.replace('gl_BaseVertex', '0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue