Skip to content

Commit b8f10ea

Browse files
committed
shader compilation with permutations and conditional vertex inputs working
1 parent 502f6f3 commit b8f10ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/build_scripts/build_shaders.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ def find_generic_functions(shader_text):
362362
continue
363363
# find the function name and return type
364364
function_name = shader_text.rfind(" ", 0, start)
365+
name_str = shader_text[function_name:start]
366+
if name_str.find("if:") != -1:
367+
start = deliminator_pos
368+
continue
365369
function_return_type = 0
366370
for delim in deliminator_list:
367371
decl_start = shader_text.rfind(delim, 0, function_name)
@@ -511,7 +515,7 @@ def generate_glsl(
511515
if len(ps_output_source.split()) > 0:
512516
ps_output_struct_name = ps_output_source.split()[1]
513517

514-
# cbuffers to unifom
518+
# cbuffers to uniform
515519
uniform_buffers = ""
516520
for cbuf in constant_buffers:
517521
name_start = cbuf.find(" ")

0 commit comments

Comments
 (0)